oama: wrap binary with libsecret and gpg optionally (#401420)

This commit is contained in:
Peder Bergebakken Sundt
2025-06-20 02:34:42 +02:00
committed by GitHub
+19
View File
@@ -2,6 +2,12 @@
haskell,
lib,
stdenv,
coreutils,
libsecret,
gnupg,
makeBinaryWrapper,
withLibsecret ? true, # default oama config uses libsecret
withGpg ? false,
}:
let
inherit (haskell.lib.compose) overrideCabal justStaticExecutables;
@@ -12,6 +18,19 @@ let
maintainers = with lib.maintainers; [ aidalgol ];
passthru.updateScript = ./update.sh;
buildDepends = [
makeBinaryWrapper
];
postInstall = ''
wrapProgram $out/bin/oama \
--prefix PATH : ${
lib.makeBinPath (
[ coreutils ] ++ lib.optional withLibsecret libsecret ++ lib.optional withGpg gnupg
)
}
'';
};
raw-pkg = haskell.packages.ghc912.callPackage ./generated-package.nix { };