2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv
|
2020-03-04 15:57:35 +00:00
|
|
|
, 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"
|
2020-09-24 03:40:21 +01:00
|
|
|
# Darwin tests require rpath for libs in build dir
|
2021-01-21 17:00:13 +00:00
|
|
|
] ++ lib.optional stdenv.isDarwin [
|
2020-09-24 03:40:21 +01:00
|
|
|
"-DCMAKE_SKIP_BUILD_RPATH=OFF"
|
2020-03-04 15:57:35 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gtest
|
|
|
|
boost
|
|
|
|
expat
|
|
|
|
zlib
|
|
|
|
uriparser
|
|
|
|
minizip
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export LD_LIBRARY_PATH=$PWD/lib
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-03-04 15:57:35 +00:00
|
|
|
description = "Reference implementation of OGC KML 2.2";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/libkml/libkml";
|
2020-03-04 15:57:35 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ costrouc ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|