diff options
author | Robert Schütz <nix@dotlambda.de> | 2021-09-18 17:09:36 -0700 |
---|---|---|
committer | Robert Schütz <nix@dotlambda.de> | 2021-09-25 16:54:15 -0700 |
commit | cb1fc48dcef7fb1d56f1d2c2c8e8c00b5c188d37 (patch) | |
tree | 8c1673fc69c2efad57b7f651f886a5ed0b86f849 /pkgs/development/libraries/proj | |
parent | cf35b27f2b8f1649f1ebdba93d0ed23d61aa75b2 (diff) |
proj_7: init at 7.2.1
Diffstat (limited to 'pkgs/development/libraries/proj')
-rw-r--r-- | pkgs/development/libraries/proj/7.nix | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/pkgs/development/libraries/proj/7.nix b/pkgs/development/libraries/proj/7.nix new file mode 100644 index 0000000000000..3eb4789939ffc --- /dev/null +++ b/pkgs/development/libraries/proj/7.nix @@ -0,0 +1,58 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, pkg-config +, sqlite +, libtiff +, curl +, gtest +, fetchpatch +}: + +stdenv.mkDerivation rec { + pname = "proj"; + version = "7.2.1"; + + src = fetchFromGitHub { + owner = "OSGeo"; + repo = "PROJ"; + rev = version; + sha256 = "0mymvfvs8xggl4axvlj7kc1ksd9g94kaz6w1vdv0x2y5mqk93gx9"; + }; + + patches = [ + (fetchpatch { # https://github.com/OSGeo/PROJ/issues/2557 + name = "gie_self_tests-fail.diff"; # included in >= 8.0.1 + url = "https://github.com/OSGeo/PROJ/commit/6f1a3c4648bf06862dca0b3725cbb3b7ee0284e3.diff"; + sha256 = "0gapny0a9c3r0x9szjgn86sspjrrf4vwbija77b17w6ci5cq4pdf"; + }) + ]; + + postPatch = lib.optionalString (version == "7.2.1") '' + substituteInPlace CMakeLists.txt \ + --replace "MAJOR 7 MINOR 2 PATCH 0" "MAJOR 7 MINOR 2 PATCH 1" + ''; + + outputs = [ "out" "dev"]; + + nativeBuildInputs = [ cmake pkg-config ]; + + buildInputs = [ sqlite libtiff curl ]; + + checkInputs = [ gtest ]; + + cmakeFlags = [ + "-DUSE_EXTERNAL_GTEST=ON" + ]; + + doCheck = true; + + meta = with lib; { + description = "Cartographic Projections Library"; + homepage = "https://proj4.org"; + license = licenses.mit; + platforms = platforms.unix; + maintainers = with maintainers; [ vbgl dotlambda ]; + }; +} |