diff options
author | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2021-07-27 14:00:18 +0200 |
---|---|---|
committer | Jonathan Ringer <jonringer@users.noreply.github.com> | 2021-07-27 08:14:56 -0700 |
commit | 96f904b076b1bc1a612be250b95a63fdcabd2c90 (patch) | |
tree | 5bdcb60e8c48f1e205863c6807f3f5e6b1b742d7 /pkgs | |
parent | 4600fb84665e56c35863038fede78fced458a7c2 (diff) |
python39Packages.python-mapnik: cleanup, remove pkgs from input, remove alias
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/libraries/mapnik/default.nix | 12 | ||||
-rw-r--r-- | pkgs/development/python-modules/python-mapnik/default.nix | 45 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 13 |
3 files changed, 41 insertions, 29 deletions
diff --git a/pkgs/development/libraries/mapnik/default.nix b/pkgs/development/libraries/mapnik/default.nix index 45d5e0a40eb03..46f2751938ee2 100644 --- a/pkgs/development/libraries/mapnik/default.nix +++ b/pkgs/development/libraries/mapnik/default.nix @@ -21,13 +21,13 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ python ]; - buildInputs = - [ boost cairo freetype gdal harfbuzz icu libjpeg libpng libtiff - libwebp proj python sqlite zlib + buildInputs = [ + boost cairo freetype gdal harfbuzz icu libjpeg libpng libtiff + libwebp proj python sqlite zlib - # optional inputs - postgresql - ]; + # optional inputs + postgresql + ]; propagatedBuildInputs = [ libxml2 ]; diff --git a/pkgs/development/python-modules/python-mapnik/default.nix b/pkgs/development/python-modules/python-mapnik/default.nix index 228e0d74ebc26..3a4e4af54def5 100644 --- a/pkgs/development/python-modules/python-mapnik/default.nix +++ b/pkgs/development/python-modules/python-mapnik/default.nix @@ -1,26 +1,29 @@ { lib , buildPythonPackage +, fetchFromGitHub , isPyPy , python -, pkgs , pillow , pycairo +, pkg-config +, boost +, cairo +, harfbuzz +, icu +, libjpeg +, libpng +, libtiff +, libwebp +, mapnik +, proj +, zlib }: -let - boost = pkgs.boost.override { - enablePython = true; - inherit python; - }; - mapnik = pkgs.mapnik.override { - inherit python boost; - }; - -in buildPythonPackage rec { +buildPythonPackage rec { pname = "python-mapnik"; version = "unstable-2020-02-24"; - src = pkgs.fetchFromGitHub { + src = fetchFromGitHub { owner = "mapnik"; repo = "python-mapnik"; rev = "7da019cf9eb12af8f8aa88b7d75789dfcd1e901b"; @@ -29,10 +32,8 @@ in buildPythonPackage rec { disabled = isPyPy; doCheck = false; # doesn't find needed test data files - preBuild = let - pythonVersion = with lib.versions; "${major python.version}${minor python.version}"; - in '' - export BOOST_PYTHON_LIB="boost_python${pythonVersion}" + preBuild = '' + export BOOST_PYTHON_LIB="boost_python${"${lib.versions.major python.version}${lib.versions.minor python.version}"}" export BOOST_THREAD_LIB="boost_thread" export BOOST_SYSTEM_LIB="boost_system" export PYCAIRO=true @@ -40,7 +41,7 @@ in buildPythonPackage rec { nativeBuildInputs = [ mapnik # for mapnik_config - pkgs.pkgconfig + pkg-config ]; patches = [ @@ -50,7 +51,6 @@ in buildPythonPackage rec { buildInputs = [ mapnik boost - ] ++ (with pkgs; [ cairo harfbuzz icu @@ -60,15 +60,16 @@ in buildPythonPackage rec { libwebp proj zlib - ]); + ]; + propagatedBuildInputs = [ pillow pycairo ]; - pythonImportsCheck = [ "mapnik" ] ; + pythonImportsCheck = [ "mapnik" ]; meta = with lib; { description = "Python bindings for Mapnik"; + maintainers = with maintainers; [ ]; homepage = "https://mapnik.org"; - license = licenses.lgpl21; + license = licenses.lgpl21; }; - } diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 554ede74f071b..32fe5cb072988 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7079,7 +7079,18 @@ in { python_magic = callPackage ../development/python-modules/python-magic { }; - python-mapnik = callPackage ../development/python-modules/python-mapnik { }; + python-mapnik = let + boost = pkgs.boost.override { + enablePython = true; + inherit python; + }; + in callPackage ../development/python-modules/python-mapnik { + inherit (pkgs) pkg-config cairo harfbuzz icu libjpeg libpng libtiff libwebp proj zlib; + inherit boost; + mapnik = pkgs.mapnik.override { + inherit python boost; + }; + }; python-markdown-math = callPackage ../development/python-modules/python-markdown-math { }; |