bash-completion: 2.9 -> 2.10

This commit is contained in:
Konrad Borowski
2020-04-13 19:11:18 +02:00
committed by Jan Tojnar
parent 8686922e68
commit 0d120b1f25
2 changed files with 28 additions and 105 deletions
+28 -19
View File
@@ -1,49 +1,58 @@
{ stdenv, fetchFromGitHub
, fetchpatch
, autoreconfHook
, perl
, ps
, python3Packages
, bashInteractive
}:
stdenv.mkDerivation rec {
pname = "bash-completion";
# TODO: Remove musl patch below upon next release!
version = "2.9";
version = "2.10";
src = fetchFromGitHub {
owner = "scop";
repo = "bash-completion";
rev = version;
sha256 = "1813r4jxfa2zgzm2ppjhrq62flfmxai8433pklxcrl4fp5wwx9yv";
sha256 = "047yjryy9d6hp18wkigbfrw9r0sm31inlsp8l28fhxg8ii032sgq";
};
nativeBuildInputs = [ autoreconfHook ];
doCheck = !stdenv.isDarwin;
checkInputs = [
# perl is assumed by perldoc completion
perl
# ps assumed to exist by gdb, killall, pgrep, pidof,
# pkill, pwdx, renice, and reptyr completions
ps
python3Packages.pexpect
python3Packages.pytest
bashInteractive
];
patches = [
./0001-Revert-build-Do-cmake-pc-and-profile-variable-replac.patch
# TODO: Remove when https://github.com/scop/bash-completion/commit/2cdac1b9f24df62a1fa80c1824ee8524c9b02393
# is availabe in a release in nixpkgs. see https://github.com/scop/bash-completion/issues/312.
# Fixes a test failure with musl.
(fetchpatch {
url = "https://github.com/scop/bash-completion/commit/2cdac1b9f24df62a1fa80c1824ee8524c9b02393.patch";
name = "bash-completion-musl-test_iconv-skip-option-completion-if-help-fails";
sha256 = "1l53d62zf01k625nzw3vcrxky93h7bzdpchgk4argxalrn17ckvb";
})
];
# ignore ip_addresses because it tries to touch network
# ignore test_ls because impure logic
# - ignore test_gcc on ARM because it assumes -march=native
# - ignore test_chsh because it assumes /etc/shells exists
# - ignore test_ether_wake, test_ifdown, test_ifstat, test_ifup,
# test_iperf, test_iperf3, test_nethogs and ip_addresses
# because they try to touch network
# - ignore test_ls because impure logic
# - ignore test_screen because it assumes vt terminals exist
checkPhase = ''
pytest . \
${stdenv.lib.optionalString (stdenv.hostPlatform.isAarch64) "--ignore=test/t/test_gcc.py"} \
--ignore=test/t/test_chsh.py \
--ignore=test/t/test_ether_wake.py \
--ignore=test/t/test_ifdown.py \
--ignore=test/t/test_ifstat.py \
--ignore=test/t/test_ifup.py \
--ignore=test/t/test_iperf.py \
--ignore=test/t/test_iperf3.py \
--ignore=test/t/test_nethogs.py \
--ignore=test/t/unit/test_unit_ip_addresses.py \
--ignore=test/t/test_ls.py
--ignore=test/t/test_ls.py \
--ignore=test/t/test_screen.py
'';
prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
@@ -55,6 +64,6 @@ stdenv.mkDerivation rec {
description = "Programmable completion for the bash shell";
license = licenses.gpl2Plus;
platforms = platforms.unix;
maintainers = [ maintainers.peti ];
maintainers = [ maintainers.peti maintainers.xfix ];
};
}