50 lines
875 B
Nix
50 lines
875 B
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, pkg-config
|
|
, sqlite
|
|
, libtiff
|
|
, curl
|
|
, gtest
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "proj";
|
|
version = "8.2.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "OSGeo";
|
|
repo = "PROJ";
|
|
rev = version;
|
|
hash = "sha256-tnaIqYKgYHY1Tg33jsKYn9QL8YUobgXKbQsodoCXNys=";
|
|
};
|
|
|
|
outputs = [ "out" "dev"];
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
buildInputs = [ sqlite libtiff curl ];
|
|
|
|
checkInputs = [ gtest ];
|
|
|
|
cmakeFlags = [
|
|
"-DUSE_EXTERNAL_GTEST=ON"
|
|
"-DRUN_NETWORK_DEPENDENT_TESTS=OFF"
|
|
];
|
|
|
|
preCheck = ''
|
|
export HOME=$TMPDIR
|
|
export TMP=$TMPDIR
|
|
'';
|
|
|
|
doCheck = true;
|
|
|
|
meta = with lib; {
|
|
description = "Cartographic Projections Library";
|
|
homepage = "https://proj.org/";
|
|
license = licenses.mit;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ vbgl dotlambda ];
|
|
};
|
|
}
|