From 34a9c0daf5b1d21c10a1836f2774d348d9c1f413 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 20 Jul 2021 11:24:28 +0200 Subject: [PATCH] Revert "proj: 7.2.1 -> 8.0.1" + patch the test This reverts commit 25b20757e8c2e929ded0215eeaad19382497c318 and adds an upstream patch. There are API changes https://proj.org/development/migration.html and I couldn't make some of the other packages build, so I decided to just patch the test instead (for now). --- pkgs/development/libraries/proj/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/proj/default.nix b/pkgs/development/libraries/proj/default.nix index 26558502c12..f22878ec829 100644 --- a/pkgs/development/libraries/proj/default.nix +++ b/pkgs/development/libraries/proj/default.nix @@ -7,19 +7,28 @@ , libtiff , curl , gtest +, fetchpatch }: stdenv.mkDerivation rec { pname = "proj"; - version = "8.0.1"; + version = "7.2.1"; src = fetchFromGitHub { owner = "OSGeo"; repo = "PROJ"; rev = version; - sha256 = "sha256-pgmv/mtqpKbgU1RuKtue7NAnMyXR1BwGJwoeA/MTrpY="; + 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"