18 stdenv.mkDerivation (finalAttrs: rec {
22 src = fetchFromGitHub {
26 hash = "sha256-M1KUXzht4qIjPfHxvzPr7XUnisMwtbegKp18XQjNYHg=";
30 # https://github.com/OSGeo/PROJ/pull/3252
31 ./only-add-curl-for-static-builds.patch
34 outputs = [ "out" "dev" ];
36 nativeBuildInputs = [ cmake pkg-config ];
38 buildInputs = [ sqlite libtiff curl nlohmann_json ];
40 nativeCheckInputs = [ cacert gtest ];
43 "-DUSE_EXTERNAL_GTEST=ON"
44 "-DRUN_NETWORK_DEPENDENT_TESTS=OFF"
45 "-DNLOHMANN_JSON_ORIGIN=external"
46 "-DEXE_SQLITE3=${buildPackages.sqlite}/bin/sqlite3"
51 libPathEnvVar = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH";
56 export ${libPathEnvVar}=$PWD/lib
62 python = python3.pkgs.pyproj;
63 proj = callPackage ./tests.nix { proj = finalAttrs.finalPackage; };
67 changelog = "https://github.com/OSGeo/PROJ/blob/${src.rev}/NEWS";
68 description = "Cartographic Projections Library";
69 homepage = "https://proj.org/";
70 license = licenses.mit;
71 maintainers = with maintainers; teams.geospatial.members ++ [ dotlambda ];
72 platforms = platforms.unix;