mirror of
https://github.com/hercules-ci/flake-parts.git
synced 2025-03-28 02:37:12 +00:00
Skip getExe when app.<name>.program
is a string
This commit is contained in:
parent
6dbc77b9c0
commit
690e548642
1 changed files with 5 additions and 1 deletions
|
@ -12,7 +12,11 @@ let
|
|||
mkPerSystemOption
|
||||
;
|
||||
|
||||
programType = lib.types.coercedTo lib.types.package getExe lib.types.str;
|
||||
programType = lib.types.coercedTo derivationType getExe lib.types.str;
|
||||
|
||||
derivationType = lib.types.package // {
|
||||
check = lib.isDerivation;
|
||||
};
|
||||
|
||||
getExe = x:
|
||||
"${lib.getBin x}/bin/${x.meta.mainProgram or (throw ''Package ${x.name or ""} does not have meta.mainProgram set, so I don't know how to find the main executable. You can set meta.mainProgram, or pass the full path to executable, e.g. program = "''${pkg}/bin/foo"'')}";
|
||||
|
|
Loading…
Add table
Reference in a new issue