diff options
author | Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> | 2015-09-27 07:02:10 +0300 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> | 2015-12-28 02:16:23 +0200 |
commit | c0aada1e1fc8ae2f7e0fe51f7e4938a03a055d52 (patch) | |
tree | 47fffd317fc69c0a40fffe7e9a378d4e91162069 /pkgs/tools/package-management | |
parent | 93d8671e2c6d1d25f126ed30e5e6f16764330119 (diff) | |
download | nixlib-c0aada1e1fc8ae2f7e0fe51f7e4938a03a055d52.tar nixlib-c0aada1e1fc8ae2f7e0fe51f7e4938a03a055d52.tar.gz nixlib-c0aada1e1fc8ae2f7e0fe51f7e4938a03a055d52.tar.bz2 nixlib-c0aada1e1fc8ae2f7e0fe51f7e4938a03a055d52.tar.lz nixlib-c0aada1e1fc8ae2f7e0fe51f7e4938a03a055d52.tar.xz nixlib-c0aada1e1fc8ae2f7e0fe51f7e4938a03a055d52.tar.zst nixlib-c0aada1e1fc8ae2f7e0fe51f7e4938a03a055d52.zip |
rpm: Hack fix finding libpython when compiling for Python 3
Currently, building RPM with `python = python3` causes this: checking for a Python interpreter with version >= 2.6... python3 checking for python3... /nix/store/dykqxnrwiz9drlcv2wy8lpvl3xvklx0g-python3-3.4.3/bin/python3 checking for python3 version... 3.4 checking for Python.h... yes checking for library containing Py_Main... no configure: error: missing python library That comes from this snippet in configure.ac: AC_SEARCH_LIBS([Py_Main],[python${PYTHON_VERSION} python],[ WITH_PYTHON_LIB="$ac_res" ],[AC_MSG_ERROR([missing python library]) ]) So it's looking for (e.g) `libpython3.4.so` wheras we have `libpython3.4m.so`. Patching the configure script to match seems to make that work (although I don't really understand what the heck is this 'm' business about).
Diffstat (limited to 'pkgs/tools/package-management')
-rw-r--r-- | pkgs/tools/package-management/rpm/default.nix | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/tools/package-management/rpm/default.nix b/pkgs/tools/package-management/rpm/default.nix index ef7b99952968..7b5281220fab 100644 --- a/pkgs/tools/package-management/rpm/default.nix +++ b/pkgs/tools/package-management/rpm/default.nix @@ -16,6 +16,11 @@ stdenv.mkDerivation rec { NIX_CFLAGS_LINK = "-L${elfutils}/lib"; + postPatch = '' + # For Python3, the original expression evaluates as 'python3.4' but we want 'python3.4m' here + substituteInPlace configure --replace 'python''${PYTHON_VERSION}' ${python.executable} + ''; + configureFlags = "--with-external-db --without-lua --enable-python"; meta = with stdenv.lib; { |