nixpkgs/pkgs/tools/graphics/povray/default.nix

50 lines
1.5 KiB
Nix
Raw Normal View History

2017-08-12 19:06:46 +00:00
{ stdenv, fetchFromGitHub, autoconf, automake, boost
2017-11-23 19:58:20 +00:00
, zlib, libpng, libjpeg, libtiff, x11, SDL
2017-08-12 19:06:46 +00:00
}:
stdenv.mkDerivation rec {
name = "povray-${version}";
version = "3.7.0.4";
2017-08-12 19:06:46 +00:00
src = fetchFromGitHub {
owner = "POV-Ray";
repo = "povray";
rev = "v${version}";
sha256 = "1wkwb43w5r9pa79yazy4w4s8n6g280igag97hgl7dyi289q39n0q";
};
2017-11-23 19:58:20 +00:00
buildInputs = [ autoconf automake boost zlib libpng libjpeg libtiff x11 SDL ];
# the installPhase wants to put files into $HOME. I let it put the files
# to $TMPDIR, so they don't get into the $out
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" ];
2015-02-15 17:33:19 +00:00
enableParallelBuilding = true;
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
'';
2015-02-15 17:33:19 +00:00
meta = with stdenv.lib; {
homepage = http://www.povray.org/;
description = "Persistence of Vision Raytracer";
2015-02-15 17:33:19 +00:00
license = licenses.free;
2017-08-12 19:06:46 +00:00
platforms = platforms.linux;
};
}