From ef8d5637f4a961d5f8d9258b9ada783a63cb270b Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Thu, 19 May 2022 04:20:00 +0000 Subject: [PATCH] ledger: separate python output --- pkgs/applications/office/ledger/default.nix | 4 ++-- pkgs/top-level/python-packages.nix | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/office/ledger/default.nix b/pkgs/applications/office/ledger/default.nix index 83c47848bc4a..d4b4bde7b10b 100644 --- a/pkgs/applications/office/ledger/default.nix +++ b/pkgs/applications/office/ledger/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { sha256 = "0x6jxwss3wwzbzlwmnwb8yzjk8f9wfawif4f1b74z2qg6hc4r7f6"; }; - outputs = [ "out" "dev" ]; + outputs = [ "out" "dev" "py" ]; buildInputs = [ (boost.override { enablePython = usePython; python = python3; }) @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { # 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 "${python3.sitePackages}"' + --replace 'DESTINATION ''${Python_SITEARCH}' 'DESTINATION "${placeholder "py"}/${python3.sitePackages}"' ''; patches = [ diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 98863f255c33..715ada8bf3e9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4717,6 +4717,11 @@ in { leb128 = callPackage ../development/python-modules/leb128 { }; + ledger = (toPythonModule (pkgs.ledger.override { + usePython = true; + python3 = python; + })).py; + ledger_agent = callPackage ../development/python-modules/ledger_agent { }; ledgerblue = callPackage ../development/python-modules/ledgerblue { };