2024-01-18 00:11:00 +01:00
|
|
|
{ stdenv, perl, sudo }:
|
2024-01-15 17:07:51 +01:00
|
|
|
|
|
|
|
let src = ../extra/bin/automation-shell.pl;
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
pname = "automation-shell";
|
|
|
|
version = "0.1";
|
|
|
|
dontUnpack = true;
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
checkInputs = [ (perl.withPackages (p: with p; [ PerlCritic ])) ];
|
|
|
|
checkPhase = ''
|
|
|
|
perlcritic ${src}
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ (perl.withPackages (p: with p; [ IOInteractive ])) sudo ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
install -Dm755 ${src} $out/bin/automation-shell
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.shellPath = "/bin/automation-shell";
|
|
|
|
}
|