nixpkgs/pkgs/development/libraries/gts/default.nix
Jonathan Ringer 9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00

49 lines
1.3 KiB
Nix

{ fetchurl, stdenv, pkg-config, autoreconfHook, gettext, glib, buildPackages }:
stdenv.mkDerivation rec {
pname = "gts";
version = "0.7.6";
outputs = [ "bin" "dev" "out" ];
src = fetchurl {
url = "mirror://sourceforge/gts/${pname}-${version}.tar.gz";
sha256 = "07mqx09jxh8cv9753y2d2jsv7wp8vjmrd7zcfpbrddz3wc9kx705";
};
nativeBuildInputs = [
pkg-config
autoreconfHook
glib # required to satisfy AM_PATH_GLIB_2_0
];
buildInputs = [ gettext ];
propagatedBuildInputs = [ glib ];
doCheck = false; # fails with "permission denied"
preBuild = stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
pushd src
make CC=${buildPackages.stdenv.cc}/bin/cc predicates_init
mv predicates_init predicates_init_build
make clean
popd
substituteInPlace src/Makefile --replace "./predicates_init" "./predicates_init_build"
'';
meta = {
homepage = "http://gts.sourceforge.net/";
license = stdenv.lib.licenses.lgpl2Plus;
description = "GNU Triangulated Surface Library";
longDescription = ''
Library intended to provide a set of useful functions to deal with
3D surfaces meshed with interconnected triangles.
'';
maintainers = [ stdenv.lib.maintainers.viric ];
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
};
}