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

authored by Peder Bergebakken Sundt and committed by GitHub b808c31e 62f7ae08

+19
+19
pkgs/by-name/oa/oama/package.nix
··· 2 haskell, 3 lib, 4 stdenv, 5 }: 6 let 7 inherit (haskell.lib.compose) overrideCabal justStaticExecutables; ··· 12 maintainers = with lib.maintainers; [ aidalgol ]; 13 14 passthru.updateScript = ./update.sh; 15 }; 16 17 raw-pkg = haskell.packages.ghc912.callPackage ./generated-package.nix { };
··· 2 haskell, 3 lib, 4 stdenv, 5 + coreutils, 6 + libsecret, 7 + gnupg, 8 + makeBinaryWrapper, 9 + withLibsecret ? true, # default oama config uses libsecret 10 + withGpg ? false, 11 }: 12 let 13 inherit (haskell.lib.compose) overrideCabal justStaticExecutables; ··· 18 maintainers = with lib.maintainers; [ aidalgol ]; 19 20 passthru.updateScript = ./update.sh; 21 + 22 + buildDepends = [ 23 + makeBinaryWrapper 24 + ]; 25 + 26 + postInstall = '' 27 + wrapProgram $out/bin/oama \ 28 + --prefix PATH : ${ 29 + lib.makeBinPath ( 30 + [ coreutils ] ++ lib.optional withLibsecret libsecret ++ lib.optional withGpg gnupg 31 + ) 32 + } 33 + ''; 34 }; 35 36 raw-pkg = haskell.packages.ghc912.callPackage ./generated-package.nix { };