summary refs log tree commit diff
path: root/pkgs/development/libraries/poly2tri-c/default.nix
blob: a3e42b3ae4b2dd8977b65e9febe24cb2cfb14285 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{ stdenv
, fetchFromGitHub
, autoreconfHook
, pkgconfig
, glib
}:

stdenv.mkDerivation rec {
  pname = "poly2tri-c";
  version = "0.1.0";

  outputs = [ "bin" "out" "dev" ];

  src = fetchFromGitHub {
    owner = "Paul-Browne";
    repo = "poly2tri-c";
    rev = "p2tc-${version}";
    sha256 = "158vm3wqfxs22b74kqc4prlvjny38qqm3kz5wrgasmx0qciwh0g8";
  };

  nativeBuildInputs = [
    autoreconfHook
    pkgconfig
  ];

  buildInputs = [
    glib
  ];

  NIX_CFLAGS_COMPILE = [
    "--std=gnu99"
    "-Wno-error"
  ];

  meta = with stdenv.lib; {
    description = "Library for generating, refining and rendering 2-Dimensional Constrained Delaunay Triangulations";
    homepage = "https://code.google.com/archive/p/poly2tri-c/";
    license = licenses.bsd3;
    maintainers = with stdenv.lib.maintainers; [ jtojnar ];
    platforms = platforms.unix;
  };
}