Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09-alpha 69 lines 2.1 kB view raw
1{ stdenv, fetchFromGitHub 2, fetchpatch 3, autoreconfHook 4, perl 5, ps 6, python3Packages 7, bashInteractive 8}: 9 10stdenv.mkDerivation rec { 11 pname = "bash-completion"; 12 version = "2.10"; 13 14 src = fetchFromGitHub { 15 owner = "scop"; 16 repo = "bash-completion"; 17 rev = version; 18 sha256 = "047yjryy9d6hp18wkigbfrw9r0sm31inlsp8l28fhxg8ii032sgq"; 19 }; 20 21 nativeBuildInputs = [ autoreconfHook ]; 22 23 doCheck = !stdenv.isDarwin; 24 checkInputs = [ 25 # perl is assumed by perldoc completion 26 perl 27 # ps assumed to exist by gdb, killall, pgrep, pidof, 28 # pkill, pwdx, renice, and reptyr completions 29 ps 30 python3Packages.pexpect 31 python3Packages.pytest 32 bashInteractive 33 ]; 34 35 # - ignore test_gcc on ARM because it assumes -march=native 36 # - ignore test_chsh because it assumes /etc/shells exists 37 # - ignore test_ether_wake, test_ifdown, test_ifstat, test_ifup, 38 # test_iperf, test_iperf3, test_nethogs and ip_addresses 39 # because they try to touch network 40 # - ignore test_ls because impure logic 41 # - ignore test_screen because it assumes vt terminals exist 42 checkPhase = '' 43 pytest . \ 44 ${stdenv.lib.optionalString (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isAarch32) "--ignore=test/t/test_gcc.py"} \ 45 --ignore=test/t/test_chsh.py \ 46 --ignore=test/t/test_ether_wake.py \ 47 --ignore=test/t/test_ifdown.py \ 48 --ignore=test/t/test_ifstat.py \ 49 --ignore=test/t/test_ifup.py \ 50 --ignore=test/t/test_iperf.py \ 51 --ignore=test/t/test_iperf3.py \ 52 --ignore=test/t/test_nethogs.py \ 53 --ignore=test/t/unit/test_unit_ip_addresses.py \ 54 --ignore=test/t/test_ls.py \ 55 --ignore=test/t/test_screen.py 56 ''; 57 58 prePatch = stdenv.lib.optionalString stdenv.isDarwin '' 59 sed -i -e 's/readlink -f/readlink/g' bash_completion completions/* 60 ''; 61 62 meta = with stdenv.lib; { 63 homepage = "https://github.com/scop/bash-completion"; 64 description = "Programmable completion for the bash shell"; 65 license = licenses.gpl2Plus; 66 platforms = platforms.unix; 67 maintainers = [ maintainers.peti maintainers.xfix ]; 68 }; 69}