1{ stdenv
2, fetchFromGitLab
3, cmake
4, ninja
5, pkg-config
6, boost
7, glib
8, gsl
9, cairo
10, double-conversion
11, gtest
12, lib
13}:
14
15stdenv.mkDerivation rec {
16 pname = "lib2geom";
17 version = "1.2";
18
19 outputs = [ "out" "dev" ];
20
21 src = fetchFromGitLab {
22 owner = "inkscape";
23 repo = "lib2geom";
24 rev = "refs/tags/${version}";
25 sha256 = "sha256-SNo5YT7o29zdxkHLuy9MT88qBg/U1Wwa3BWShF5ACTc=";
26 };
27
28 nativeBuildInputs = [
29 cmake
30 ninja
31 pkg-config
32 ];
33
34 buildInputs = [
35 boost
36 glib
37 gsl
38 cairo
39 double-conversion
40 ];
41
42 checkInputs = [
43 gtest
44 ];
45
46 cmakeFlags = [
47 "-D2GEOM_BUILD_SHARED=ON"
48 ];
49
50 doCheck = true;
51
52 meta = with lib; {
53 description = "Easy to use 2D geometry library in C++";
54 homepage = "https://gitlab.com/inkscape/lib2geom";
55 license = [ licenses.lgpl21Only licenses.mpl11 ];
56 maintainers = with maintainers; [ jtojnar ];
57 platforms = platforms.unix;
58 };
59}