summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2022-07-05 11:56:48 +0200
committerMartin Michlmayr <tbm@cyrius.com>2022-07-08 07:31:14 +0800
commit04d64fafbc53c745f28f5ea4715488d07b6332c2 (patch)
tree92b9a873b89142d10771f1fd8b20469bf4f10ffc /flake.nix
parented53241ea6664ed000a06a5dd540c1a5d4f42c2e (diff)
downloadfork-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.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/flake.nix b/flake.nix
index 468ba46d..cc93053d 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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