1{ stdenv, fetchurl }:
2
3stdenv.mkDerivation rec {
4 name = "bash-completion-${version}";
5 version = "2.7";
6
7 src = fetchurl {
8 url = "https://github.com/scop/bash-completion/releases/download/${version}/${name}.tar.xz";
9 sha256 = "07j484vb3k90f4989xh1g1x99g01akrp69p3dml4lza27wnqkfj1";
10 };
11
12 doCheck = true;
13
14 prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
15 sed -i -e 's/readlink -f/readlink/g' bash_completion completions/*
16 '';
17
18 meta = with stdenv.lib; {
19 homepage = https://github.com/scop/bash-completion;
20 description = "Programmable completion for the bash shell";
21 license = licenses.gpl2Plus;
22 platforms = platforms.unix;
23 maintainers = [ maintainers.peti ];
24 };
25}