mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-17 19:23:50 +00:00
eb92804f91
This moves nixos-containers into its own package so that it can be relied upon by other packages/systems. This should make development using dynamic containers much easier.
18 lines
461 B
Nix
18 lines
461 B
Nix
{ substituteAll, perl, perlPackages, shadow, utillinux }:
|
|
|
|
substituteAll {
|
|
name = "nixos-container";
|
|
dir = "bin";
|
|
isExecutable = true;
|
|
src = ./nixos-container.pl;
|
|
perl = "${perl}/bin/perl -I${perlPackages.FileSlurp}/lib/perl5/site_perl";
|
|
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
|
|
'';
|
|
}
|