mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
a7cb88c3de
Use $out/share/bash-completion/completions to store the Bash completions
17 lines
491 B
Nix
17 lines
491 B
Nix
{ substituteAll, perlPackages, shadow, utillinux }:
|
|
|
|
substituteAll {
|
|
name = "nixos-container";
|
|
dir = "bin";
|
|
isExecutable = true;
|
|
src = ./nixos-container.pl;
|
|
perl = "${perlPackages.perl}/bin/perl -I${perlPackages.FileSlurp}/${perlPackages.perl.libPrefix}";
|
|
su = "${shadow.su}/bin/su";
|
|
inherit utillinux;
|
|
|
|
postInstall = ''
|
|
t=$out/share/bash-completion/completions
|
|
mkdir -p $t
|
|
cp ${./nixos-container-completion.sh} $t/nixos-container
|
|
'';
|
|
}
|