Skip to content

Commit

Permalink
Merge pull request #234072 from ShamrockLee/write-script-bin-mainprogram
Browse files Browse the repository at this point in the history
writeScriptBin, writeShellScriptBin: add meta.mainProgram automatically
  • Loading branch information
Kranzes committed May 26, 2023
2 parents 435237d + b29d5f6 commit 2b54d69
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkgs/build-support/trivial-builders/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ rec {
*/
writeScriptBin = name: text: writeTextFile {inherit name text; executable = true; destination = "/bin/${name}";};
writeScriptBin = name: text: writeTextFile {inherit name text; executable = true; destination = "/bin/${name}"; meta.mainProgram = name;};

/*
Similar to writeScript. Writes a Shell script and checks its syntax.
Expand Down Expand Up @@ -288,6 +288,7 @@ rec {
checkPhase = ''
${stdenv.shellDryRun} "$target"
'';
meta.mainProgram = name;
};

/*
Expand Down

0 comments on commit 2b54d69

Please sign in to comment.