From c9c8acfbc88d436de660b2ddbd675a47264df6fc Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Sat, 1 Aug 2020 17:25:55 -0700 Subject: [PATCH] ledger: 3.1.3 -> 3.2.1 --- pkgs/applications/office/ledger/default.nix | 27 +++++++++++++-------- pkgs/top-level/all-packages.nix | 7 +----- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/pkgs/applications/office/ledger/default.nix b/pkgs/applications/office/ledger/default.nix index 6ac092f27e2..543545de263 100644 --- a/pkgs/applications/office/ledger/default.nix +++ b/pkgs/applications/office/ledger/default.nix @@ -1,37 +1,44 @@ -{ stdenv, fetchFromGitHub, cmake, boost, gmp, mpfr, libedit, python +{ stdenv, lib, fetchFromGitHub, cmake, boost, gmp, mpfr, libedit, python , texinfo, gnused, usePython ? true }: stdenv.mkDerivation rec { pname = "ledger"; - version = "3.1.3"; + version = "3.2.1"; src = fetchFromGitHub { owner = "ledger"; repo = "ledger"; rev = "v${version}"; - sha256 = "0bfnrqrd6wqgsngfpqi30xh6yy86pwl25iwzrqy44q31r0zl4mm3"; + sha256 = "0x6jxwss3wwzbzlwmnwb8yzjk8f9wfawif4f1b74z2qg6hc4r7f6"; }; + outputs = [ "out" "dev" ]; + buildInputs = [ (boost.override { enablePython = usePython; }) - gmp mpfr libedit python texinfo gnused + gmp mpfr libedit python gnused ]; - nativeBuildInputs = [ cmake ]; + nativeBuildInputs = [ cmake texinfo ]; enableParallelBuilding = true; cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" "-DBUILD_DOCS:BOOL=ON" - (stdenv.lib.optionalString usePython "-DUSE_PYTHON=true") - ]; + (lib.optionalString usePython "-DUSE_PYTHON=true") + ]; - postBuild = '' - make doc + # by default, it will query the python interpreter for it's sitepackages location + # however, that would write to a different nixstore path, pass our own sitePackages location + prePatch = lib.optionalString usePython '' + substituteInPlace src/CMakeLists.txt \ + --replace 'DESTINATION ''${Python_SITEARCH}' 'DESTINATION "${python.sitePackages}"' ''; - meta = with stdenv.lib; { + installTargets = [ "doc" "install" ]; + + meta = with lib; { homepage = "https://ledger-cli.org/"; description = "A double-entry accounting system with a command-line reporting interface"; license = licenses.bsd3; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6cb552e7c78..f885f36c7ca 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21073,12 +21073,7 @@ in linuxband = callPackage ../applications/audio/linuxband { }; - ledger = callPackage ../applications/office/ledger { - # Boost >= 1.67 changed the name of boost python; ledger's cmake build needs - # an update to find it: - # https://www.boost.org/doc/libs/1_68_0/libs/python/doc/html/rn.html - boost = boost15x; - }; + ledger = callPackage ../applications/office/ledger { }; ledger-autosync = callPackage ../applications/office/ledger-autosync { };