mv executable

This commit is contained in:
Kiara Grouwstra 2025-08-11 15:18:37 +02:00
parent 0e9fb00940
commit dfac12a864
Signed by: kiara
SSH key fingerprint: SHA256:COspvLoLJ5WC5rFb9ZDe5urVCkK4LJZOsjfF4duRJFU

View file

@ -12,7 +12,7 @@
text,
outPath,
owner ? "root",
group ? "",
group ? owner,
mode ? "0400",
}:
pkgs.runCommand name {
@ -20,6 +20,8 @@
script = ''
#!/bin/sh
${nix_templater}/bin/nix_templater ${builtins.placeholder "out"}/template ${builtins.placeholder "nix_template"} "${outPath}"
chown ${owner}:${group} "${outPath}"
chmod ${mode} "${outPath}"
'';
passAsFile = [ "script" "textBeforeTemplate" ];
} ''
@ -27,7 +29,5 @@
cp $textBeforeTemplatePath $out/template
cp $scriptPath $out/bin/${name}
chmod +x $out/bin/${name}
chown ${owner}:${group} $out/bin/${name}
chmod ${mode} $out/bin/${name}
'';
}