2019-08-14 01:57:46 +01:00
|
|
|
{ stdenv, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
, python3Packages
|
|
|
|
, bashInteractive
|
|
|
|
}:
|
2011-07-21 23:02:01 +01:00
|
|
|
|
2013-04-10 16:39:03 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "bash-completion";
|
2019-08-14 01:57:46 +01:00
|
|
|
version = "2.9";
|
2011-07-21 23:02:01 +01:00
|
|
|
|
2019-08-14 01:57:46 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "scop";
|
|
|
|
repo = "bash-completion";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "1813r4jxfa2zgzm2ppjhrq62flfmxai8433pklxcrl4fp5wwx9yv";
|
2011-07-21 23:02:01 +01:00
|
|
|
};
|
|
|
|
|
2019-08-14 01:57:46 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
|
2019-10-26 03:00:00 +01:00
|
|
|
doCheck = !stdenv.isDarwin;
|
2019-08-14 01:57:46 +01:00
|
|
|
checkInputs = [
|
|
|
|
python3Packages.pexpect
|
|
|
|
python3Packages.pytest
|
|
|
|
bashInteractive
|
|
|
|
];
|
|
|
|
|
2019-10-22 14:17:14 +01:00
|
|
|
patches = [
|
|
|
|
./0001-Revert-build-Do-cmake-pc-and-profile-variable-replac.patch
|
|
|
|
];
|
|
|
|
|
2019-08-14 01:57:46 +01:00
|
|
|
# ignore ip_addresses because it tries to touch network
|
|
|
|
# ignore test_ls because impure logic
|
|
|
|
checkPhase = ''
|
|
|
|
pytest . \
|
|
|
|
--ignore=test/t/unit/test_unit_ip_addresses.py \
|
|
|
|
--ignore=test/t/test_ls.py
|
|
|
|
'';
|
2011-07-21 23:02:01 +01:00
|
|
|
|
2017-02-10 20:42:12 +00:00
|
|
|
prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
sed -i -e 's/readlink -f/readlink/g' bash_completion completions/*
|
|
|
|
'';
|
|
|
|
|
2016-09-28 16:45:45 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://github.com/scop/bash-completion;
|
2011-07-21 23:02:01 +01:00
|
|
|
description = "Programmable completion for the bash shell";
|
2016-09-28 16:45:45 +01:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.peti ];
|
2011-07-21 23:02:01 +01:00
|
|
|
};
|
|
|
|
}
|