mirror of
https://github.com/hercules-ci/flake-parts.git
synced 2024-12-14 11:47:31 +00:00
apps: Add polyfill
This commit is contained in:
parent
562a6b5e54
commit
238b0dc94b
1 changed files with 5 additions and 1 deletions
|
@ -3,12 +3,16 @@ let
|
|||
inherit (lib)
|
||||
mkOption
|
||||
types
|
||||
getExe
|
||||
;
|
||||
inherit (flake-parts-lib)
|
||||
mkTransposedPerSystemModule
|
||||
;
|
||||
|
||||
getExe = lib.getExe or (
|
||||
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"'')}"
|
||||
);
|
||||
|
||||
programType = lib.types.coercedTo derivationType getExe lib.types.str;
|
||||
|
||||
derivationType = lib.types.package // {
|
||||
|
|
Loading…
Reference in a new issue