writeScriptBin, writeShellScriptBin: add meta.mainProgram automatically

This commit is contained in:
Yueh-Shun Li 2023-05-26 04:50:52 +08:00
parent c016238dad
commit b29d5f60b8

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