nixpkgs/pkgs/development/libraries/proj/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.1 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, cmake
, pkg-config
, buildPackages
, sqlite
, libtiff
, curl
, gtest
2022-03-19 18:10:49 +00:00
, nlohmann_json
}:
2019-07-10 00:39:33 +00:00
stdenv.mkDerivation rec {
2020-03-27 23:49:34 +00:00
pname = "proj";
2022-03-19 18:10:49 +00:00
version = "9.0.0";
2019-07-10 00:39:33 +00:00
src = fetchFromGitHub {
owner = "OSGeo";
repo = "PROJ";
rev = version;
2022-03-19 18:10:49 +00:00
sha256 = "sha256-zMP+WzC65BFz8g8mF5t7toqxmxCJePysd6WJuqpe8yg=";
};
2022-03-19 18:10:49 +00:00
outputs = [ "out" "dev" ];
2019-07-10 00:39:33 +00:00
nativeBuildInputs = [ cmake pkg-config ];
2019-07-10 00:39:33 +00:00
2022-03-19 18:10:49 +00:00
buildInputs = [ sqlite libtiff curl nlohmann_json ];
2019-07-10 00:39:33 +00:00
checkInputs = [ gtest ];
cmakeFlags = [
"-DUSE_EXTERNAL_GTEST=ON"
2021-09-18 23:36:59 +00:00
"-DRUN_NETWORK_DEPENDENT_TESTS=OFF"
2022-03-19 18:10:49 +00:00
"-DNLOHMANN_JSON_ORIGIN=external"
"-DEXE_SQLITE3=${buildPackages.sqlite}/bin/sqlite3"
];
2022-03-19 18:10:49 +00:00
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
'';
2021-09-18 23:36:59 +00:00
doCheck = true;
meta = with lib; {
description = "Cartographic Projections Library";
2021-09-18 23:36:59 +00:00
homepage = "https://proj.org/";
2014-11-08 20:15:46 +00:00
license = licenses.mit;
platforms = platforms.unix;
maintainers = with maintainers; [ dotlambda ];
};
}