3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/virtualization/nixos-container/default.nix

18 lines
479 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/etc/bash_completion.d
mkdir -p $t
cp ${./nixos-container-completion.sh} $t/nixos-container
'';
}