1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-29 00:54:11 +00:00
nixpkgs/pkgs/tools/misc/gibo/default.nix
Jonas Chevalier a7cb88c3de
tree-wide: unify Bash completions outputs (#103421)
Use $out/share/bash-completion/completions to store the Bash completions
2020-11-12 21:22:18 +00:00

35 lines
1,022 B
Nix

{ stdenv, fetchFromGitHub, coreutils, findutils, git }:
stdenv.mkDerivation rec {
pname = "gibo";
version = "1.0.6";
src = fetchFromGitHub {
owner = "simonwhitaker";
repo = "gibo";
rev = version;
sha256 = "07j3sv9ar9l074krajw8nfmsfmdp836irsbd053dbqk2v880gfm6";
};
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
installPhase = ''
mkdir -p $out/bin $out/share/bash-completion/completions
cp gibo $out/bin
cp gibo-completion.bash $out/share/bash-completion/completions
sed -e 's|\<git |${git}/bin/git |g' \
-e 's|\<basename |${coreutils}/bin/basename |g' \
-i "$out/bin/gibo"
sed -e 's|\<find |${findutils}/bin/find |g' \
-i "$out/share/bash-completion/completions/gibo-completion.bash"
'';
meta = {
homepage = "https://github.com/simonwhitaker/gibo";
license = stdenv.lib.licenses.publicDomain;
description = "A shell script for easily accessing gitignore boilerplates";
platforms = stdenv.lib.platforms.unix;
};
}