about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/office/ledger
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-06-16 06:56:35 +0000
committerAlyssa Ross <hi@alyssa.is>2023-06-16 06:56:35 +0000
commit99fcaeccb89621dd492203ce1f2d551c06f228ed (patch)
tree41cb730ae07383004789779b0f6e11cb3f4642a3 /nixpkgs/pkgs/applications/office/ledger
parent59c5f5ac8682acc13bb22bc29c7cf02f7d75f01f (diff)
parent75a5ebf473cd60148ba9aec0d219f72e5cf52519 (diff)
downloadnixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.gz
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.bz2
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.lz
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.xz
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.zst
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.zip
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Conflicts:
	nixpkgs/nixos/modules/config/console.nix
	nixpkgs/nixos/modules/services/mail/mailman.nix
	nixpkgs/nixos/modules/services/mail/public-inbox.nix
	nixpkgs/nixos/modules/services/mail/rss2email.nix
	nixpkgs/nixos/modules/services/networking/ssh/sshd.nix
	nixpkgs/pkgs/applications/networking/instant-messengers/dino/default.nix
	nixpkgs/pkgs/applications/networking/irc/weechat/default.nix
	nixpkgs/pkgs/applications/window-managers/sway/default.nix
	nixpkgs/pkgs/build-support/go/module.nix
	nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
	nixpkgs/pkgs/development/interpreters/python/default.nix
	nixpkgs/pkgs/development/node-packages/overrides.nix
	nixpkgs/pkgs/development/tools/b4/default.nix
	nixpkgs/pkgs/servers/dict/dictd-db.nix
	nixpkgs/pkgs/servers/mail/public-inbox/default.nix
	nixpkgs/pkgs/tools/security/pinentry/default.nix
	nixpkgs/pkgs/tools/text/unoconv/default.nix
	nixpkgs/pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixpkgs/pkgs/applications/office/ledger')
-rw-r--r--nixpkgs/pkgs/applications/office/ledger/default.nix34
1 files changed, 14 insertions, 20 deletions
diff --git a/nixpkgs/pkgs/applications/office/ledger/default.nix b/nixpkgs/pkgs/applications/office/ledger/default.nix
index d4b4bde7b10b..2e8336660be7 100644
--- a/nixpkgs/pkgs/applications/office/ledger/default.nix
+++ b/nixpkgs/pkgs/applications/office/ledger/default.nix
@@ -1,30 +1,34 @@
-{ stdenv, lib, fetchFromGitHub, cmake, boost, gmp, mpfr, libedit, python3
-, fetchpatch, installShellFiles, texinfo, gnused, usePython ? true }:
+{ stdenv, lib, fetchFromGitHub, cmake, boost, gmp, mpfr, libedit, python3, gpgme
+, installShellFiles, texinfo, gnused, usePython ? false, gpgmeSupport ? false }:
 
 stdenv.mkDerivation rec {
   pname = "ledger";
-  version = "3.2.1";
+  version = "3.3.2";
 
   src = fetchFromGitHub {
     owner  = "ledger";
     repo   = "ledger";
     rev    = "v${version}";
-    sha256 = "0x6jxwss3wwzbzlwmnwb8yzjk8f9wfawif4f1b74z2qg6hc4r7f6";
+    hash   = "sha256-Uym4s8EyzXHlISZqThcb6P1H5bdgD9vmdIOLkk5ikG0=";
   };
 
-  outputs = [ "out" "dev" "py" ];
+  outputs = [ "out" "dev" ] ++ lib.optionals usePython [ "py" ];
 
   buildInputs = [
-    (boost.override { enablePython = usePython; python = python3; })
     gmp mpfr libedit gnused
-  ] ++ lib.optional usePython python3;
+  ] ++ lib.optionals gpgmeSupport [
+    gpgme
+  ] ++ (if usePython
+        then [ python3 (boost.override { enablePython = true; python = python3; }) ]
+        else [ boost ]);
 
   nativeBuildInputs = [ cmake texinfo installShellFiles ];
 
   cmakeFlags = [
     "-DCMAKE_INSTALL_LIBDIR=lib"
     "-DBUILD_DOCS:BOOL=ON"
-    (lib.optionalString usePython "-DUSE_PYTHON=true")
+    "-DUSE_PYTHON:BOOL=${if usePython then "ON" else "OFF"}"
+    "-DUSE_GPGME:BOOL=${if gpgmeSupport then "ON" else "OFF"}"
   ];
 
   # by default, it will query the python interpreter for it's sitepackages location
@@ -34,15 +38,6 @@ stdenv.mkDerivation rec {
       --replace 'DESTINATION ''${Python_SITEARCH}' 'DESTINATION "${placeholder "py"}/${python3.sitePackages}"'
   '';
 
-  patches = [
-    # Add support for $XDG_CONFIG_HOME. Remove with the next release
-    (fetchpatch {
-      url = "https://github.com/ledger/ledger/commit/c79674649dee7577d6061e3d0776922257520fd0.patch";
-      sha256 = "sha256-vwVQnY9EUCXPzhDJ4PSOmQStb9eF6H0yAOiEmL6sAlk=";
-      excludes = [ "doc/NEWS.md" ];
-    })
-  ];
-
   installTargets = [ "doc" "install" ];
 
   postInstall = ''
@@ -50,17 +45,16 @@ stdenv.mkDerivation rec {
   '';
 
   meta = with lib; {
-    homepage = "https://ledger-cli.org/";
     description = "A double-entry accounting system with a command-line reporting interface";
+    homepage = "https://www.ledger-cli.org/";
+    changelog = "https://github.com/ledger/ledger/raw/v${version}/NEWS.md";
     license = licenses.bsd3;
-
     longDescription = ''
       Ledger is a powerful, double-entry accounting system that is accessed
       from the UNIX command-line. This may put off some users, as there is
       no flashy UI, but for those who want unparalleled reporting access to
       their data, there really is no alternative.
     '';
-
     platforms = platforms.all;
     maintainers = with maintainers; [ jwiegley marsam ];
   };