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