mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 22:23:15 +00:00
357014e09c
Darwin tests require rpath setup for libs in build dir
57 lines
965 B
Nix
57 lines
965 B
Nix
{ stdenv
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, boost
|
|
, expat
|
|
, zlib
|
|
, uriparser
|
|
, minizip
|
|
, gtest
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "libkml";
|
|
version = "1.3.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "libkml";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "0gl4cqfps9mzx6hzf3dc10hy5y8smpyf1s31sqm7w343hgsllv0z";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
];
|
|
|
|
cmakeFlags = [
|
|
"-DBUILD_TESTING=ON"
|
|
# Darwin tests require rpath for libs in build dir
|
|
] ++ stdenv.lib.optional stdenv.isDarwin [
|
|
"-DCMAKE_SKIP_BUILD_RPATH=OFF"
|
|
];
|
|
|
|
buildInputs = [
|
|
gtest
|
|
boost
|
|
expat
|
|
zlib
|
|
uriparser
|
|
minizip
|
|
];
|
|
|
|
preCheck = ''
|
|
export LD_LIBRARY_PATH=$PWD/lib
|
|
'';
|
|
|
|
doCheck = true;
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "Reference implementation of OGC KML 2.2";
|
|
homepage = "https://github.com/libkml/libkml";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ costrouc ];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|