2012-01-26 20:01:38 +01:00
|
|
|
{stdenv, fetchurl, mesa, freeglut, glew, libXmu, libXext, libX11
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-11-03 23:28:31 +01:00
|
|
|
version = "1.4.0";
|
2012-01-26 20:01:38 +01:00
|
|
|
name = "opencsg-${version}";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.opencsg.org/OpenCSG-${version}.tar.gz";
|
2014-11-03 23:28:31 +01:00
|
|
|
sha256 = "13c73jxadm27h7spdh3qj1v6rnn81v4xwqlv5a6k72pv9kjnpd7c";
|
2012-01-26 20:01:38 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [mesa freeglut glew libXmu libXext libX11];
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
2016-03-16 12:37:35 +01:00
|
|
|
preConfigure = ''
|
|
|
|
sed -i 's/^\(LIBS *=.*\)$/\1 -lX11/' example/Makefile
|
|
|
|
'';
|
|
|
|
|
2012-01-26 20:01:38 +01:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -pv "$out/"{bin,share/doc/opencsg}
|
|
|
|
|
|
|
|
cp example/opencsgexample "$out/bin"
|
|
|
|
cp -r include lib "$out"
|
|
|
|
|
|
|
|
cp license.txt "$out/share/doc/opencsg"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Constructive Solid Geometry library";
|
2017-08-01 22:03:30 +02:00
|
|
|
homepage = http://www.opencsg.org/;
|
2012-01-26 20:01:38 +01:00
|
|
|
platforms = with stdenv.lib.platforms;
|
|
|
|
linux;
|
|
|
|
maintainers = with stdenv.lib.maintainers;
|
|
|
|
[raskin];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|