nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 72 lines 1.6 kB view raw
1{ stdenv 2, lib 3, buildPythonPackage 4, fetchPypi 5, bash 6, coreutils 7, eventlet 8, fasteners 9, fixtures 10, iana-etc 11, libredirect 12, oslo-config 13, oslo-utils 14, oslotest 15, pbr 16, stestr 17}: 18 19buildPythonPackage rec { 20 pname = "oslo-concurrency"; 21 version = "4.5.0"; 22 23 src = fetchPypi { 24 pname = "oslo.concurrency"; 25 inherit version; 26 sha256 = "1h76pq9p1bpwcs6jl9m2w4280wcp2w3is88qlaqknqkd3pdaixwr"; 27 }; 28 29 postPatch = '' 30 # only a small portion of the listed packages are actually needed for running the tests 31 # so instead of removing them one by one remove everything 32 rm test-requirements.txt 33 34 substituteInPlace oslo_concurrency/tests/unit/test_processutils.py \ 35 --replace "/bin/bash" "${bash}/bin/bash" \ 36 --replace "/bin/true" "${coreutils}/bin/true" \ 37 --replace "/usr/bin/env" "${coreutils}/bin/env" \ 38 --replace "/usr/bin/true" "${coreutils}/bin/true" 39 ''; 40 41 propagatedBuildInputs = [ 42 fasteners 43 oslo-config 44 oslo-utils 45 pbr 46 ]; 47 48 checkInputs = [ 49 eventlet 50 fixtures 51 oslotest 52 stestr 53 ]; 54 55 checkPhase = '' 56 echo "nameserver 127.0.0.1" > resolv.conf 57 export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/resolv.conf=$(realpath resolv.conf) 58 export LD_PRELOAD=${libredirect}/lib/libredirect.so 59 60 stestr run 61 ''; 62 63 pythonImportsCheck = [ "oslo_concurrency" ]; 64 65 meta = with lib; { 66 broken = stdenv.isDarwin; 67 description = "Oslo Concurrency library"; 68 homepage = "https://github.com/openstack/oslo.concurrency"; 69 license = licenses.asl20; 70 maintainers = teams.openstack.members; 71 }; 72}