2018-02-24 05:12:44 -08:00
|
|
|
{stdenv, fetchurl, libGLU_combined, freeglut, glew, libXmu, libXext, libX11
|
2012-01-26 11:01:38 -08:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-02-27 08:45:20 -08:00
|
|
|
version = "1.4.2";
|
2012-01-26 11:01:38 -08:00
|
|
|
name = "opencsg-${version}";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.opencsg.org/OpenCSG-${version}.tar.gz";
|
2018-02-27 08:45:20 -08:00
|
|
|
sha256 = "1ysazynm759gnw1rdhn9xw9nixnzrlzrc462340a6iif79fyqlnr";
|
2012-01-26 11:01:38 -08:00
|
|
|
};
|
|
|
|
|
2018-02-24 05:12:44 -08:00
|
|
|
buildInputs = [libGLU_combined freeglut glew libXmu libXext libX11];
|
2012-01-26 11:01:38 -08:00
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
2016-03-16 04:37:35 -07:00
|
|
|
preConfigure = ''
|
|
|
|
sed -i 's/^\(LIBS *=.*\)$/\1 -lX11/' example/Makefile
|
|
|
|
'';
|
|
|
|
|
2012-01-26 11:01:38 -08: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"
|
|
|
|
'';
|
|
|
|
|
2018-10-25 12:58:46 -07:00
|
|
|
meta = with stdenv.lib; {
|
2012-01-26 11:01:38 -08:00
|
|
|
description = "Constructive Solid Geometry library";
|
2017-08-01 13:03:30 -07:00
|
|
|
homepage = http://www.opencsg.org/;
|
2018-10-25 12:58:46 -07:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.raskin ];
|
|
|
|
license = licenses.gpl2;
|
2012-01-26 11:01:38 -08:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|