1
0
Fork 0
mirror of https://github.com/hercules-ci/flake-parts.git synced 2025-04-16 01:06:49 +00:00

apps: use lib.getExe to find executable

This commit is contained in:
Patrick Jackson 2023-07-31 08:56:50 -07:00
parent 8e8d955c22
commit acd542d16b

View file

@ -3,6 +3,7 @@ let
inherit (lib)
mkOption
types
getExe
;
inherit (flake-parts-lib)
mkTransposedPerSystemModule
@ -14,9 +15,6 @@ let
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"'')}";
appType = lib.types.submodule {
options = {
type = mkOption {