1 { fetchurl, lib, stdenv, pkg-config, autoreconfHook, gettext, glib, buildPackages }:
4 stdenv.mkDerivation rec {
8 outputs = [ "bin" "dev" "out" ];
11 url = "mirror://sourceforge/gts/${pname}-${version}.tar.gz";
12 sha256 = "07mqx09jxh8cv9753y2d2jsv7wp8vjmrd7zcfpbrddz3wc9kx705";
18 glib # required to satisfy AM_PATH_GLIB_2_0
20 buildInputs = [ gettext ];
21 propagatedBuildInputs = [ glib ];
23 doCheck = false; # fails with "permission denied"
25 preBuild = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
27 make CC=${buildPackages.stdenv.cc}/bin/cc predicates_init
28 mv predicates_init predicates_init_build
32 substituteInPlace src/Makefile --replace "./predicates_init" "./predicates_init_build"
36 homepage = "http://gts.sourceforge.net/";
37 license = lib.licenses.lgpl2Plus;
38 description = "GNU Triangulated Surface Library";
41 Library intended to provide a set of useful functions to deal with
42 3D surfaces meshed with interconnected triangles.
45 maintainers = [ lib.maintainers.viric ];
46 platforms = lib.platforms.linux ++ lib.platforms.darwin;