Merge pull request #234072 from ShamrockLee/write-script-bin-mainprogram

writeScriptBin, writeShellScriptBin: add meta.mainProgram automatically
This commit is contained in:
Ilan Joselevich 2023-05-26 17:07:42 +03:00 committed by GitHub
commit 2b54d69007
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
};
/*