From 1d421778b7fd7fe5908b73c7e40efa0a98daf4a0 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Wed, 8 Feb 2023 04:20:00 +0000 Subject: [PATCH] ledger: do not build with python by default --- pkgs/applications/office/ledger/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/office/ledger/default.nix b/pkgs/applications/office/ledger/default.nix index 2c0ecf21a2e3..3ac52ce78784 100644 --- a/pkgs/applications/office/ledger/default.nix +++ b/pkgs/applications/office/ledger/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchFromGitHub, cmake, boost, gmp, mpfr, libedit, python3 -, installShellFiles, texinfo, gnused, usePython ? true }: +, installShellFiles, texinfo, gnused, usePython ? false }: stdenv.mkDerivation rec { pname = "ledger"; @@ -12,19 +12,20 @@ stdenv.mkDerivation rec { hash = "sha256-0hN6Hpmgwb3naV2K1fxX0OyH0IyCQAh1nZ9TMNAutic="; }; - 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; + ] ++ (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"}" ]; # by default, it will query the python interpreter for it's sitepackages location