diff options
author | Austin Seipp <aseipp@pobox.com> | 2018-06-09 17:31:00 -0500 |
---|---|---|
committer | Austin Seipp <aseipp@pobox.com> | 2018-06-09 17:35:12 -0500 |
commit | 350f49734b161895803df1e3eb712df4f9c0e81e (patch) | |
tree | d897141bd64acbef28d1e7862849ca1c7d6cac3f /pkgs | |
parent | 84670fb9c827e5f1c77d70013e4bb637e051aa2a (diff) | |
download | nixlib-350f49734b161895803df1e3eb712df4f9c0e81e.tar nixlib-350f49734b161895803df1e3eb712df4f9c0e81e.tar.gz nixlib-350f49734b161895803df1e3eb712df4f9c0e81e.tar.bz2 nixlib-350f49734b161895803df1e3eb712df4f9c0e81e.tar.lz nixlib-350f49734b161895803df1e3eb712df4f9c0e81e.tar.xz nixlib-350f49734b161895803df1e3eb712df4f9c0e81e.tar.zst nixlib-350f49734b161895803df1e3eb712df4f9c0e81e.zip |
pythonPackages.pylibmc: fix runtime dependency on libsasl2.so, by way of cyrus_sasl
Without explicitly specifying that libsasl2 is part of the build, and without explicitly making it part of pylibmc's linker flags for its CPython extension, the cpython code enters a build state error where it instead attempts to blindly `dlopen("libsasl2.so")` out of $LD_LIBRARY_PATH; this fails as it can't be found in the store, obviously. The bigger problem with this is that it otherwise makes pylibmc unusable, as it will try to immediately load libsasl2 at startup. This means even using 'import pylibmc' at all will cause a failure. Instead, add cyrus_sasl into the build closure of the library, and pass an argument to the setup.py script to properly pass -lsasl2 to the C extension. This causes a link to properly be formed. Signed-off-by: Austin Seipp <aseipp@pobox.com>
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/python-modules/pylibmc/default.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/development/python-modules/pylibmc/default.nix b/pkgs/development/python-modules/pylibmc/default.nix index 7f57f17efeb1..47499e4ae188 100644 --- a/pkgs/development/python-modules/pylibmc/default.nix +++ b/pkgs/development/python-modules/pylibmc/default.nix @@ -1,4 +1,5 @@ -{ buildPythonPackage, fetchPypi, stdenv, libmemcached, zlib }: +{ buildPythonPackage, fetchPypi, stdenv, libmemcached, zlib, cyrus_sasl }: + buildPythonPackage rec { version = "1.5.2"; pname = "pylibmc"; @@ -9,7 +10,8 @@ buildPythonPackage rec { sha256 = "fc54e28a9f1b5b2ec0c030da29c7ad8a15c2755bd98aaa4142eaf419d5fabb33"; }; - buildInputs = [ libmemcached zlib ]; + buildInputs = [ libmemcached zlib cyrus_sasl ]; + setupPyBuildFlags = [ "--with-sasl2" ]; # requires an external memcached server running doCheck = false; |