mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 15:41:48 +00:00
cb49c14324
This reverts commit
c37e76b4d2
. 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
|
|
'';
|
|
}
|