diff options
| author | Matthew Bauer <mjbauer95@gmail.com> | 2019-05-02 17:37:20 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-02 17:37:20 -0400 |
| commit | 296e8fef618c7597c3dfa84be2fcdb2771350b61 (patch) | |
| tree | 36c75341bd3f64da0d722da4fb30ec3a8d0fad87 /pkgs/development/python-modules/python-mapnik | |
| parent | 4688f4078fa655fa3e56a8a4b2591fb195a7eceb (diff) | |
| parent | 3567b1390fde8681a0f0b4581f2babbe863ede9a (diff) | |
Merge branch 'staging' into mesa_3
Diffstat (limited to 'pkgs/development/python-modules/python-mapnik')
| -rw-r--r-- | pkgs/development/python-modules/python-mapnik/default.nix | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/python-mapnik/default.nix b/pkgs/development/python-modules/python-mapnik/default.nix new file mode 100644 index 000000000000..8523020ccf50 --- /dev/null +++ b/pkgs/development/python-modules/python-mapnik/default.nix @@ -0,0 +1,67 @@ +{ stdenv +, buildPythonPackage +, fetchFromGitHub +, isPyPy +, python +, pkgs +, pillow +, pycairo +}: + +let + boost = pkgs.boost.override { + enablePython = true; + inherit python; + }; + mapnik = pkgs.mapnik.override { + inherit python boost; + }; + +in buildPythonPackage rec { + pname = "python-mapnik"; + version = "3.0.16"; + + src = pkgs.fetchFromGitHub { + owner = "mapnik"; + repo = "python-mapnik"; + rev = "v${version}"; + sha256 = "1gqs4kvmjawdgl80j0ab5r8y0va9kw0rvwix3093xsv4hwd00lcc"; + }; + + disabled = isPyPy; + doCheck = false; # doesn't find needed test data files + preBuild = let + pythonVersion = with stdenv.lib.versions; "${major python.version}${minor python.version}"; + in '' + export BOOST_PYTHON_LIB="boost_python${pythonVersion}" + export BOOST_THREAD_LIB="boost_thread" + export BOOST_SYSTEM_LIB="boost_system" + ''; + + nativeBuildInputs = [ + mapnik # for mapnik_config + ]; + + buildInputs = [ + mapnik + boost + ] ++ (with pkgs; [ + cairo + harfbuzz + icu + libjpeg + libpng + libtiff + libwebp + proj + zlib + ]); + propagatedBuildInputs = [ pillow pycairo ]; + + meta = with stdenv.lib; { + description = "Python bindings for Mapnik"; + homepage = https://mapnik.org; + license = licenses.lgpl21; + }; + +} |
