diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/proj')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/proj/7.nix | 58 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/proj/default.nix | 59 |
2 files changed, 117 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/proj/7.nix b/nixpkgs/pkgs/development/libraries/proj/7.nix new file mode 100644 index 000000000000..3eb4789939ff --- /dev/null +++ b/nixpkgs/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 ]; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/proj/default.nix b/nixpkgs/pkgs/development/libraries/proj/default.nix new file mode 100644 index 000000000000..6ecc3606b96d --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/proj/default.nix @@ -0,0 +1,59 @@ +{ lib +, stdenv +, fetchFromGitHub +, fetchpatch +, cmake +, pkg-config +, sqlite +, libtiff +, curl +, gtest +}: + +stdenv.mkDerivation rec { + pname = "proj"; + version = "8.2.0"; + + src = fetchFromGitHub { + owner = "OSGeo"; + repo = "PROJ"; + rev = version; + sha256 = "sha256-YXZ3txBWW5vUcdYLISJPxdFGCQpKi1vvJlX8rntujg8="; + }; + + patches = [ + (fetchpatch { + name = "Make-CApi-test-cross-platform.patch"; + url = "https://github.com/OSGeo/PROJ/commit/ac113a8898cded7f5359f1edd3abc17a78eee9b4.patch"; + sha256 = "0gz2xa5nxzck5c0yr7cspv3kw4cz3fxb2yic76w7qfvxidi7z1s1"; + }) + ]; + + outputs = [ "out" "dev"]; + + nativeBuildInputs = [ cmake pkg-config ]; + + buildInputs = [ sqlite libtiff curl ]; + + checkInputs = [ gtest ]; + + cmakeFlags = [ + "-DUSE_EXTERNAL_GTEST=ON" + "-DRUN_NETWORK_DEPENDENT_TESTS=OFF" + ]; + + preCheck = '' + export HOME=$TMPDIR + export TMP=$TMPDIR + ''; + + doCheck = true; + + meta = with lib; { + description = "Cartographic Projections Library"; + homepage = "https://proj.org/"; + license = licenses.mit; + platforms = platforms.unix; + maintainers = with maintainers; [ vbgl dotlambda ]; + }; +} |