diff options
Diffstat (limited to 'nixpkgs/pkgs/shells/bash/bash-completion/default.nix')
-rw-r--r-- | nixpkgs/pkgs/shells/bash/bash-completion/default.nix | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/nixpkgs/pkgs/shells/bash/bash-completion/default.nix b/nixpkgs/pkgs/shells/bash/bash-completion/default.nix index 5fda57048121..0ebcaa9e8645 100644 --- a/nixpkgs/pkgs/shells/bash/bash-completion/default.nix +++ b/nixpkgs/pkgs/shells/bash/bash-completion/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub +{ lib, stdenv, fetchurl , fetchpatch , autoreconfHook , perl @@ -11,11 +11,13 @@ stdenv.mkDerivation rec { pname = "bash-completion"; version = "2.11"; - src = fetchFromGitHub { - owner = "scop"; - repo = "bash-completion"; - rev = version; - sha256 = "0m3brd5jx7w07h8vxvvcmbyrlnadrx6hra3cvx6grzv6rin89liv"; + # Using fetchurl because fetchGithub or fetchzip will have trouble on + # e.g. APFS filesystems (macOS) because of non UTF-8 characters in some of the + # test fixtures that are part of the repository. + # See discussion in https://github.com/NixOS/nixpkgs/issues/107768 + src = fetchurl { + url = "https://github.com/scop/${pname}/releases/download/${version}/${pname}-${version}.tar.xz"; + sha256 = "1b0iz7da1sgifx1a5wdyx1kxbzys53v0kyk8nhxfipllmm5qka3k"; }; nativeBuildInputs = [ autoreconfHook ]; @@ -43,7 +45,7 @@ stdenv.mkDerivation rec { # - ignore test_screen because it assumes vt terminals exist checkPhase = '' pytest . \ - ${stdenv.lib.optionalString (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isAarch32) "--ignore=test/t/test_gcc.py"} \ + ${lib.optionalString (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isAarch32) "--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 \ @@ -57,11 +59,11 @@ stdenv.mkDerivation rec { --ignore=test/t/test_screen.py ''; - prePatch = stdenv.lib.optionalString stdenv.isDarwin '' + prePatch = lib.optionalString stdenv.isDarwin '' sed -i -e 's/readlink -f/readlink/g' bash_completion completions/* ''; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://github.com/scop/bash-completion"; description = "Programmable completion for the bash shell"; license = licenses.gpl2Plus; |