ledger: build python bindings with python3
Upstream supports python3 in the version we have, so we can upgrade. Tested with `ledger python` on my files and it seems to work fine.
This commit is contained in:
parent
7260e7c1e8
commit
79567a8b58
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, lib, fetchFromGitHub, cmake, boost, gmp, mpfr, libedit, python
|
{ stdenv, lib, fetchFromGitHub, cmake, boost, gmp, mpfr, libedit, python3
|
||||||
, texinfo, gnused, usePython ? true }:
|
, texinfo, gnused, usePython ? true }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
@ -15,8 +15,8 @@ stdenv.mkDerivation rec {
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
(boost.override { enablePython = usePython; })
|
(boost.override { enablePython = usePython; python = python3; })
|
||||||
gmp mpfr libedit python gnused
|
gmp mpfr libedit python3 gnused
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake texinfo ];
|
nativeBuildInputs = [ cmake texinfo ];
|
||||||
|
@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
|
||||||
# however, that would write to a different nixstore path, pass our own sitePackages location
|
# however, that would write to a different nixstore path, pass our own sitePackages location
|
||||||
prePatch = lib.optionalString usePython ''
|
prePatch = lib.optionalString usePython ''
|
||||||
substituteInPlace src/CMakeLists.txt \
|
substituteInPlace src/CMakeLists.txt \
|
||||||
--replace 'DESTINATION ''${Python_SITEARCH}' 'DESTINATION "${python.sitePackages}"'
|
--replace 'DESTINATION ''${Python_SITEARCH}' 'DESTINATION "${python3.sitePackages}"'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installTargets = [ "doc" "install" ];
|
installTargets = [ "doc" "install" ];
|
||||||
|
|
Loading…
Reference in New Issue