nixpkgs/pkgs/tools/virtualization/nixos-container/default.nix
Eelco Dolstra cb49c14324
Revert "nixos-container: Use machinectl shell (#18825)"
This reverts commit
c37e76b4d2ac59139df8956cc2b1ec6921bea11d. Unfortunately, using
"machinectl shell" has two bad side effects:

* It sends the command's stderr to stdout.

* It doesn't propagate the command's exit status.

This broke NixOps.

PR #18825.
2017-03-21 16:51:08 +01:00

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
'';
}