From 0cf88814bdcd57ac95f5d2eebabae53b2a77b8b5 Mon Sep 17 00:00:00 2001 From: Will Cohen Date: Sat, 19 Mar 2022 14:10:49 -0400 Subject: [PATCH] proj: 8.2.1 -> 9.0.0 --- pkgs/development/libraries/proj/default.nix | 23 ++++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/proj/default.nix b/pkgs/development/libraries/proj/default.nix index 376cb36edd61..a8e42fb6fb17 100644 --- a/pkgs/development/libraries/proj/default.nix +++ b/pkgs/development/libraries/proj/default.nix @@ -7,36 +7,43 @@ , libtiff , curl , gtest +, nlohmann_json }: stdenv.mkDerivation rec { pname = "proj"; - version = "8.2.1"; + version = "9.0.0"; src = fetchFromGitHub { owner = "OSGeo"; repo = "PROJ"; rev = version; - hash = "sha256-tnaIqYKgYHY1Tg33jsKYn9QL8YUobgXKbQsodoCXNys="; + sha256 = "sha256-zMP+WzC65BFz8g8mF5t7toqxmxCJePysd6WJuqpe8yg="; }; - outputs = [ "out" "dev"]; + outputs = [ "out" "dev" ]; nativeBuildInputs = [ cmake pkg-config ]; - buildInputs = [ sqlite libtiff curl ]; + buildInputs = [ sqlite libtiff curl nlohmann_json ]; checkInputs = [ gtest ]; cmakeFlags = [ "-DUSE_EXTERNAL_GTEST=ON" "-DRUN_NETWORK_DEPENDENT_TESTS=OFF" + "-DNLOHMANN_JSON_ORIGIN=external" ]; - preCheck = '' - export HOME=$TMPDIR - export TMP=$TMPDIR - ''; + preCheck = + let + libPathEnvVar = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH"; + in + '' + export HOME=$TMPDIR + export TMP=$TMPDIR + export ${libPathEnvVar}=$PWD/lib + ''; doCheck = true;