2022-10-29 23:03:46 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoconf
|
|
|
|
, automake
|
|
|
|
, boost
|
|
|
|
, zlib
|
|
|
|
, libX11
|
|
|
|
, libICE
|
|
|
|
, libSM
|
|
|
|
, libpng
|
|
|
|
, libjpeg
|
|
|
|
, libtiff
|
|
|
|
, SDL
|
2017-08-12 20:06:46 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "povray";
|
2019-10-08 04:16:42 +01:00
|
|
|
version = "3.8.0-x.10064738";
|
2017-08-12 20:06:46 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "POV-Ray";
|
|
|
|
repo = "povray";
|
|
|
|
rev = "v${version}";
|
2019-10-08 04:16:42 +01:00
|
|
|
sha256 = "0hy5a3q5092szk2x3s9lpn1zkszgq9bp15rxzdncxlvnanyzsasf";
|
2009-05-14 09:49:46 +01:00
|
|
|
};
|
|
|
|
|
2022-03-31 02:11:06 +01:00
|
|
|
nativeBuildInputs = [ automake autoconf ];
|
2022-10-29 23:03:46 +01:00
|
|
|
buildInputs = [ boost zlib libX11 libICE libSM libpng libjpeg libtiff SDL ];
|
2014-08-04 12:03:25 +01:00
|
|
|
|
2009-05-14 09:49:46 +01: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 12:03:25 +01: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 19:58:20 +00:00
|
|
|
configureFlags = [ "COMPILED_BY='nix'" "--with-boost-thread=boost_thread" "--with-x" ];
|
2014-08-04 12:03:25 +01:00
|
|
|
|
2015-02-15 17:33:19 +00:00
|
|
|
enableParallelBuilding = true;
|
2018-07-17 21:11:16 +01:00
|
|
|
|
2014-08-04 12:03:25 +01:00
|
|
|
preInstall = ''
|
|
|
|
mkdir "$TMP/bin"
|
|
|
|
for i in chown chgrp; do
|
2019-01-15 22:41:31 +00:00
|
|
|
echo '#!${stdenv.shell}' >> "$TMP/bin/$i"
|
2014-08-04 12:03:25 +01:00
|
|
|
chmod +x "$TMP/bin/$i"
|
|
|
|
PATH="$TMP/bin:$PATH"
|
|
|
|
done
|
2009-05-14 09:49:46 +01:00
|
|
|
'';
|
2014-11-06 00:44:33 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.povray.org/";
|
2009-05-14 09:49:46 +01:00
|
|
|
description = "Persistence of Vision Raytracer";
|
2015-02-15 17:33:19 +00:00
|
|
|
license = licenses.free;
|
2017-08-12 20:06:46 +01:00
|
|
|
platforms = platforms.linux;
|
2009-05-14 09:49:46 +01:00
|
|
|
};
|
|
|
|
}
|