2017-08-12 21:06:46 +02:00
|
|
|
{ stdenv, fetchFromGitHub, autoconf, automake, boost
|
2017-11-23 20:58:20 +01:00
|
|
|
, zlib, libpng, libjpeg, libtiff, x11, SDL
|
2017-08-12 21:06:46 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "povray-${version}";
|
2018-02-27 20:38:30 +01:00
|
|
|
version = "3.7.0.7";
|
2017-08-12 21:06:46 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "POV-Ray";
|
|
|
|
repo = "povray";
|
|
|
|
rev = "v${version}";
|
2018-02-27 20:38:30 +01:00
|
|
|
sha256 = "0gqbc4ycjfqpnixzzqxlygmargk6sm77b0k3xzff9dxdrak3xng7";
|
2009-05-14 10:49:46 +02:00
|
|
|
};
|
|
|
|
|
2014-08-04 13:03:25 +02:00
|
|
|
|
2017-11-23 20:58:20 +01:00
|
|
|
buildInputs = [ autoconf automake boost zlib libpng libjpeg libtiff x11 SDL ];
|
2014-08-04 13:03:25 +02:00
|
|
|
|
2009-05-14 10:49:46 +02:00
|
|
|
# the installPhase wants to put files into $HOME. I let it put the files
|
|
|
|
# to $TMPDIR, so they don't get into the $out
|
2014-08-04 13:03:25 +02:00
|
|
|
postPatch = '' cd unix
|
|
|
|
./prebuild.sh
|
|
|
|
cd ..
|
|
|
|
sed -i -e 's/^povconfuser.*/povconfuser=$(TMPDIR)\/povray/' Makefile.{am,in}
|
|
|
|
sed -i -e 's/^povuser.*/povuser=$(TMPDIR)\/.povray/' Makefile.{am,in}
|
|
|
|
sed -i -e 's/^povowner.*/povowner=nobody/' Makefile.{am,in}
|
|
|
|
sed -i -e 's/^povgroup.*/povgroup=nogroup/' Makefile.{am,in}
|
|
|
|
'';
|
|
|
|
|
2017-11-23 20:58:20 +01:00
|
|
|
configureFlags = [ "COMPILED_BY='nix'" "--with-boost-thread=boost_thread" "--with-x" ];
|
2014-08-04 13:03:25 +02:00
|
|
|
|
2015-02-15 18:33:19 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2014-08-04 13:03:25 +02:00
|
|
|
preInstall = ''
|
|
|
|
mkdir "$TMP/bin"
|
|
|
|
for i in chown chgrp; do
|
|
|
|
echo '#!/bin/sh' >> "$TMP/bin/$i"
|
|
|
|
chmod +x "$TMP/bin/$i"
|
|
|
|
PATH="$TMP/bin:$PATH"
|
|
|
|
done
|
2009-05-14 10:49:46 +02:00
|
|
|
'';
|
2014-11-06 01:44:33 +01:00
|
|
|
|
2015-02-15 18:33:19 +01:00
|
|
|
meta = with stdenv.lib; {
|
2009-05-14 10:49:46 +02:00
|
|
|
homepage = http://www.povray.org/;
|
|
|
|
description = "Persistence of Vision Raytracer";
|
2015-02-15 18:33:19 +01:00
|
|
|
license = licenses.free;
|
2017-08-12 21:06:46 +02:00
|
|
|
platforms = platforms.linux;
|
2009-05-14 10:49:46 +02:00
|
|
|
};
|
|
|
|
}
|