diff options
author | Ilan Joselevich <personal@ilanjoselevich.com> | 2023-05-26 17:07:42 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-26 17:07:42 +0300 |
commit | 2b54d69007653db3d465044a2228e4141d134352 (patch) | |
tree | 901466a4fe8326a5a368804ef34e1415abc3497a /pkgs | |
parent | 435237d641c9e195572ac40057fc32d62c42f965 (diff) | |
parent | b29d5f60b8706d86b5410008c9e91447fbf8fea4 (diff) |
Merge pull request #234072 from ShamrockLee/write-script-bin-mainprogram
writeScriptBin, writeShellScriptBin: add meta.mainProgram automatically
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/build-support/trivial-builders/default.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/build-support/trivial-builders/default.nix b/pkgs/build-support/trivial-builders/default.nix index e90d0a6d20229..255a873e4cc59 100644 --- a/pkgs/build-support/trivial-builders/default.nix +++ b/pkgs/build-support/trivial-builders/default.nix @@ -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. @@ -288,6 +288,7 @@ rec { checkPhase = '' ${stdenv.shellDryRun} "$target" ''; + meta.mainProgram = name; }; /* |