diff options
author | Alexis Hildebrandt <afh@surryhill.net> | 2022-07-05 11:56:48 +0200 |
---|---|---|
committer | Martin Michlmayr <tbm@cyrius.com> | 2022-07-08 07:31:14 +0800 |
commit | 04d64fafbc53c745f28f5ea4715488d07b6332c2 (patch) | |
tree | 92b9a873b89142d10771f1fd8b20469bf4f10ffc /flake.nix | |
parent | ed53241ea6664ed000a06a5dd540c1a5d4f42c2e (diff) | |
download | fork-ledger-04d64fafbc53c745f28f5ea4715488d07b6332c2.tar.gz fork-ledger-04d64fafbc53c745f28f5ea4715488d07b6332c2.tar.bz2 fork-ledger-04d64fafbc53c745f28f5ea4715488d07b6332c2.zip |
Add useGgpme option to flake.nix
to toggle building ledger with support for encrypted journal files
using gpgme.
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -2,6 +2,7 @@ description = "A double-entry accounting system with a command-line reporting interface"; outputs = { self, nixpkgs }: let + useGpgme = true; forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system); nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; }); systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; @@ -17,11 +18,16 @@ src = self; nativeBuildInputs = with pkgs; [ cmake ]; - buildInputs = with pkgs; [ boost gmp mpfr libedit python3 texinfo gnused gpgme ]; + buildInputs = with pkgs; [ + boost gmp mpfr libedit python3 texinfo gnused + ] ++ pkgs.lib.optional useGpgme gpgme; enableParallelBuilding = true; - cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" "-DUSE_GPGME=1" ]; + cmakeFlags = [ + "-DCMAKE_INSTALL_LIBDIR=lib" + (pkgs.lib.optionalString useGpgme "-DUSE_GPGME=1") + ]; checkPhase = '' export LD_LIBRARY_PATH=$PWD |