2021-05-29 03:34:57 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2021-12-06 16:07:01 +00:00
|
|
|
, fetchpatch
|
2021-05-29 03:34:57 +00:00
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, sqlite
|
|
|
|
, libtiff
|
|
|
|
, curl
|
|
|
|
, gtest
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "proj";
|
2022-01-03 16:56:52 +00:00
|
|
|
version = "8.2.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "OSGeo";
|
|
|
|
repo = "PROJ";
|
|
|
|
rev = version;
|
2022-01-03 16:56:52 +00:00
|
|
|
sha256 = "sha256-YXZ3txBWW5vUcdYLISJPxdFGCQpKi1vvJlX8rntujg8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "Make-CApi-test-cross-platform.patch";
|
|
|
|
url = "https://github.com/OSGeo/PROJ/commit/ac113a8898cded7f5359f1edd3abc17a78eee9b4.patch";
|
|
|
|
sha256 = "0gz2xa5nxzck5c0yr7cspv3kw4cz3fxb2yic76w7qfvxidi7z1s1";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
outputs = [ "out" "dev"];
|
|
|
|
|
2021-05-29 03:34:57 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-13 19:44:15 +00:00
|
|
|
buildInputs = [ sqlite libtiff curl ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-29 03:34:57 +00:00
|
|
|
checkInputs = [ gtest ];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DUSE_EXTERNAL_GTEST=ON"
|
2021-09-28 08:13:01 +00:00
|
|
|
"-DRUN_NETWORK_DEPENDENT_TESTS=OFF"
|
2021-05-29 03:34:57 +00:00
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
export TMP=$TMPDIR
|
|
|
|
'';
|
|
|
|
|
2021-09-28 08:13:01 +00:00
|
|
|
doCheck = true;
|
2021-05-29 03:34:57 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Cartographic Projections Library";
|
2021-09-28 08:13:01 +00:00
|
|
|
homepage = "https://proj.org/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2021-05-29 03:34:57 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ vbgl dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|