diff --git a/pkgs/development/libraries/libplist/default.nix b/pkgs/development/libraries/libplist/default.nix index 19b700ca5e30..63599c4352d0 100644 --- a/pkgs/development/libraries/libplist/default.nix +++ b/pkgs/development/libraries/libplist/default.nix @@ -1,8 +1,5 @@ -{ stdenv, autoreconfHook, fetchFromGitHub, pkgconfig, python2Packages, glib }: +{ stdenv, autoreconfHook, fetchFromGitHub, pkgconfig, enablePython ? false, python, glib }: -let - inherit (python2Packages) python cython; -in stdenv.mkDerivation rec { pname = "libplist"; version = "2019-04-04"; @@ -14,18 +11,23 @@ stdenv.mkDerivation rec { sha256 = "19yw80yblq29i2jx9yb7bx0lfychy9dncri3fk4as35kq5bf26i8"; }; - outputs = ["bin" "dev" "out" "py"]; + outputs = ["bin" "dev" "out" ] ++ stdenv.lib.optional enablePython "py"; nativeBuildInputs = [ pkgconfig - python - cython autoreconfHook + ] ++ stdenv.lib.optionals enablePython [ + python + python.pkgs.cython + ]; + + configureFlags = stdenv.lib.optionals (!enablePython) [ + "--without-cython" ]; propagatedBuildInputs = [ glib ]; - postFixup = '' + postFixup = stdenv.lib.optionalString enablePython '' moveToOutput "lib/${python.libPrefix}" "$py" ''; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ec8df2017414..b25186a0aa60 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3863,7 +3863,7 @@ in { libsavitar = callPackage ../development/python-modules/libsavitar { }; libplist = disabledIf isPy3k - (toPythonModule (pkgs.libplist.override{python2Packages=self; })).py; + (toPythonModule (pkgs.libplist.override { enablePython = true; inherit python; })).py; libxml2 = (toPythonModule (pkgs.libxml2.override{pythonSupport=true; inherit python;})).py;