2018-11-12 00:01:52 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitLab
|
|
|
|
, cmake
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, boost
|
|
|
|
, glib
|
|
|
|
, gsl
|
|
|
|
, cairo
|
|
|
|
, double-conversion
|
|
|
|
, gtest
|
2021-05-25 07:28:26 +00:00
|
|
|
, lib
|
2018-11-12 00:01:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-05-25 07:28:26 +00:00
|
|
|
pname = "lib2geom";
|
|
|
|
version = "1.1";
|
2018-11-12 00:01:52 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "inkscape";
|
|
|
|
repo = "lib2geom";
|
2021-05-25 07:28:26 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
sha256 = "sha256-u9pbpwVzAXzrM2/tQnd1B6Jo9Fzg6UZBr9AtUsNMfQ0=";
|
2018-11-12 00:01:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
boost
|
|
|
|
glib
|
|
|
|
gsl
|
|
|
|
cairo
|
|
|
|
double-conversion
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
gtest
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DCMAKE_SKIP_BUILD_RPATH=OFF" # for tests
|
2021-05-25 07:28:26 +00:00
|
|
|
"-D2GEOM_BUILD_SHARED=ON"
|
2018-11-12 00:01:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2021-05-25 07:28:26 +00:00
|
|
|
meta = with lib; {
|
2018-11-12 00:01:52 +00:00
|
|
|
description = "Easy to use 2D geometry library in C++";
|
|
|
|
homepage = "https://gitlab.com/inkscape/lib2geom";
|
2021-05-25 07:28:26 +00:00
|
|
|
license = [ licenses.lgpl21Only licenses.mpl11 ];
|
2018-11-12 00:01:52 +00:00
|
|
|
maintainers = with maintainers; [ jtojnar ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|