Loading pkgs/build-support/trivial-builders/default.nix +8 −5 Original line number Diff line number Diff line Loading @@ -135,9 +135,15 @@ rec { , allowSubstitutes ? false , preferLocalBuild ? true }: let matches = builtins.match "/bin/([^/]+)" destination; in runCommand name { inherit text executable checkPhase meta allowSubstitutes preferLocalBuild; { inherit text executable checkPhase allowSubstitutes preferLocalBuild; passAsFile = [ "text" ]; meta = lib.optionalAttrs (executable && matches != null) { mainProgram = lib.head matches; } // meta; } '' target=$out${lib.escapeShellArg destination} Loading Loading @@ -230,7 +236,7 @@ rec { */ writeScriptBin = name: text: writeTextFile {inherit name text; executable = true; destination = "/bin/${name}"; meta.mainProgram = name;}; writeScriptBin = name: text: writeTextFile {inherit name text; executable = true; destination = "/bin/${name}";}; /* Similar to writeScript. Writes a Shell script and checks its syntax. Loading Loading @@ -288,7 +294,6 @@ rec { checkPhase = '' ${stdenv.shellDryRun} "$target" ''; meta.mainProgram = name; }; /* Loading Loading @@ -351,8 +356,6 @@ rec { runHook postCheck '' else checkPhase; meta.mainProgram = name; }; # Create a C binary Loading Loading
pkgs/build-support/trivial-builders/default.nix +8 −5 Original line number Diff line number Diff line Loading @@ -135,9 +135,15 @@ rec { , allowSubstitutes ? false , preferLocalBuild ? true }: let matches = builtins.match "/bin/([^/]+)" destination; in runCommand name { inherit text executable checkPhase meta allowSubstitutes preferLocalBuild; { inherit text executable checkPhase allowSubstitutes preferLocalBuild; passAsFile = [ "text" ]; meta = lib.optionalAttrs (executable && matches != null) { mainProgram = lib.head matches; } // meta; } '' target=$out${lib.escapeShellArg destination} Loading Loading @@ -230,7 +236,7 @@ rec { */ writeScriptBin = name: text: writeTextFile {inherit name text; executable = true; destination = "/bin/${name}"; meta.mainProgram = name;}; writeScriptBin = name: text: writeTextFile {inherit name text; executable = true; destination = "/bin/${name}";}; /* Similar to writeScript. Writes a Shell script and checks its syntax. Loading Loading @@ -288,7 +294,6 @@ rec { checkPhase = '' ${stdenv.shellDryRun} "$target" ''; meta.mainProgram = name; }; /* Loading Loading @@ -351,8 +356,6 @@ rec { runHook postCheck '' else checkPhase; meta.mainProgram = name; }; # Create a C binary Loading