diff --git a/pkgs/by-name/oa/oama/package.nix b/pkgs/by-name/oa/oama/package.nix index d68fc20ae775..7a282ca82f88 100644 --- a/pkgs/by-name/oa/oama/package.nix +++ b/pkgs/by-name/oa/oama/package.nix @@ -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 { };