nixpkgs/pkgs/development/libraries/proj/default.nix
toonn aabbed57e7
proj: Patch test OPEN_MAX limit assumption (#145371)
One of the tests had a Linux-based assumption on the number of files
that can be opened. I have submitted this patch upstream here,
https://github.com/OSGeo/PROJ/pull/2934, and it's been merged but I
don't expect to be able to update to a release before ZHF ends.

Fixes #142875
2021-11-10 16:03:40 -05:00

54 lines
1.1 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, pkg-config
, sqlite
, libtiff
, curl
, gtest
}:
stdenv.mkDerivation rec {
pname = "proj";
version = "8.1.1";
src = fetchFromGitHub {
owner = "OSGeo";
repo = "PROJ";
rev = version;
sha256 = "sha256-Z2nruyowC3NG4Wb8AFBL0PME/zp9D7SwQdMSl6VjH/w=";
};
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"
];
doCheck = true;
meta = with lib; {
description = "Cartographic Projections Library";
homepage = "https://proj.org/";
license = licenses.mit;
platforms = platforms.unix;
maintainers = with maintainers; [ vbgl dotlambda ];
};
}