oama: wrap binary with libsecret and gpg optionally (#401420)
This commit is contained in:
@@ -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 { };
|
||||
|
||||
Reference in New Issue
Block a user