exec: allow manual specification of program path
This commit is contained in:
parent
3e2b369e3e
commit
ebcbf91fbe
@ -10,6 +10,7 @@
|
|||||||
, argv ? []
|
, argv ? []
|
||||||
, post ? ""
|
, post ? ""
|
||||||
, nixPrefix ? ""
|
, nixPrefix ? ""
|
||||||
|
, program ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with builtins;
|
with builtins;
|
||||||
@ -18,6 +19,7 @@ with garlicTools;
|
|||||||
let
|
let
|
||||||
argvString = concatStringsSep " " (map (e: toString e) argv);
|
argvString = concatStringsSep " " (map (e: toString e) argv);
|
||||||
execMethod = if (post == "") then "exec " else "";
|
execMethod = if (post == "") then "exec " else "";
|
||||||
|
programPath = if (program != null) then program else (stageProgram nextStage);
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "exec";
|
name = "exec";
|
||||||
@ -30,7 +32,7 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
${pre}
|
${pre}
|
||||||
|
|
||||||
${execMethod}${nixPrefix}${stageProgram nextStage} ${argvString}
|
${execMethod}${nixPrefix}${programPath} ${argvString}
|
||||||
|
|
||||||
${post}
|
${post}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user