git.iko.soy/typeable/nixpkgs
on master help sign in
mapproxy: init at 1.12.0
commit21b11bfc0e42936c2c5f8c51f9d9de7de9f9c327 authorRakesh Gupta <rakeshgupta4u@gmail.com> dateThu 6 Feb 2020, 18:02 (7 years ago) parentc047430
2 files changed+65
pkgs/applications/misc/mapproxy/default.nix+63 pkgs/top-level/all-packages.nix+2
pkgs/applications/misc/mapproxy/default.nixnew file+63
@@ -0,0 +1,63 @@
1+{ lib
2+, pkgs
3+, python
4+}:
5+let
6+ py = python.override {
7+ packageOverrides = self: super: {
8+ pyproj = super.pyproj.overridePythonAttrs (oldAttrs: rec {
9+ version = "1.9.6";
10+ src = pkgs.fetchFromGitHub {
11+ owner = "pyproj4";
12+ repo = "pyproj";
13+ rev = "v${version}rel";
14+ sha256 = "sha256:18v4h7jx4mcc0x2xy8y7dfjq9bzsyxs8hdb6v67cabvlz2njziqy";
15+ };
16+ nativeBuildInputs = with python.pkgs; [ cython ];
17+ patches = [ ];
18+ checkPhase = ''
19+ runHook preCheck
20+ pushd unittest # changing directory should ensure we're importing the global pyproj
21+ ${python.interpreter} test.py && ${python.interpreter} -c "import doctest, pyproj, sys; sys.exit(doctest.testmod(pyproj)[0])"
22+ popd
23+ runHook postCheck
24+ '';
25+ });
26+ };
27+ };
28+in
29+with py.pkgs;
30+buildPythonApplication rec {
31+ pname = "MapProxy";
32+ version = "1.12.0";
33+ src = fetchPypi {
34+ inherit pname version;
35+ sha256 = "622e3a7796ef861ba21e42231b49c18d00d75f03eaf3f01a2b7687be7568e2ec";
36+ };
37+ prePatch = ''
38+ substituteInPlace mapproxy/util/ext/serving.py --replace "args = [sys.executable] + sys.argv" "args = sys.argv"
39+ '';
40+ propagatedBuildInputs = [
41+ pillow
42+ pyyaml
43+ pyproj
44+ shapely
45+ gdal
46+ lxml
47+ setuptools
48+ ];
49+ # Tests are disabled:
50+ # 1) Dependency list is huge.
51+ # https://github.com/mapproxy/mapproxy/blob/master/requirements-tests.txt
52+ #
53+ # 2) There are security issues with package Riak
54+ # https://github.com/NixOS/nixpkgs/issues/33876
55+ # https://github.com/NixOS/nixpkgs/pull/56480
56+ doCheck = false;
57+ meta = with lib; {
58+ description = "MapProxy is an open source proxy for geospatial data";
59+ homepage = https://mapproxy.org/;
60+ license = licenses.asl20;
61+ maintainers = with maintainers; [ rakesh4g ];
62+ };
63+}
pkgs/top-level/all-packages.nix+2
@@ -1929,6 +1929,8 @@ in
19291929
19301930 lynis = callPackage ../tools/security/lynis { };
19311931
1932+ mapproxy = callPackage ../applications/misc/mapproxy { };
1933+
19321934 marlin-calc = callPackage ../tools/misc/marlin-calc {};
19331935
19341936 mathics = with python2Packages; toPythonApplication mathics;