nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitLab,
5 autoreconfHook,
6 pkg-config,
7 glib,
8}:
9
10stdenv.mkDerivation (finalAttrs: {
11 pname = "poly2tri-c";
12 version = "0.1.0";
13
14 outputs = [
15 "bin"
16 "out"
17 "dev"
18 ];
19
20 src = fetchFromGitLab {
21 domain = "gitlab.gnome.org";
22 owner = "jtojnar";
23 repo = "poly2tri-c";
24 rev = "p2tc-${finalAttrs.version}";
25 sha256 = "158vm3wqfxs22b74kqc4prlvjny38qqm3kz5wrgasmx0qciwh0g8";
26 };
27
28 nativeBuildInputs = [
29 autoreconfHook
30 pkg-config
31 ];
32
33 buildInputs = [
34 glib
35 ];
36
37 env.NIX_CFLAGS_COMPILE = toString [
38 "--std=gnu99"
39 "-Wno-error"
40 ];
41
42 meta = {
43 description = "Library for generating, refining and rendering 2-Dimensional Constrained Delaunay Triangulations";
44 mainProgram = "p2tc";
45 homepage = "https://code.google.com/archive/p/poly2tri-c/";
46 license = lib.licenses.bsd3;
47 maintainers = with lib.maintainers; [ jtojnar ];
48 platforms = lib.platforms.unix;
49 };
50})