From ebcbf91fbef0b930991f72e37161f7f1c6d57a0a Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Tue, 23 Feb 2021 15:22:18 +0100 Subject: [PATCH] exec: allow manual specification of program path --- garlic/stages/exec.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/garlic/stages/exec.nix b/garlic/stages/exec.nix index eea89f1..8717041 100644 --- a/garlic/stages/exec.nix +++ b/garlic/stages/exec.nix @@ -10,6 +10,7 @@ , argv ? [] , post ? "" , nixPrefix ? "" +, program ? null }: with builtins; @@ -18,6 +19,7 @@ with garlicTools; let argvString = concatStringsSep " " (map (e: toString e) argv); execMethod = if (post == "") then "exec " else ""; + programPath = if (program != null) then program else (stageProgram nextStage); in stdenv.mkDerivation { name = "exec"; @@ -30,7 +32,7 @@ stdenv.mkDerivation { ${pre} - ${execMethod}${nixPrefix}${stageProgram nextStage} ${argvString} + ${execMethod}${nixPrefix}${programPath} ${argvString} ${post}