2022-10-30 15:09:59 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoconf
|
|
|
|
, automake
|
|
|
|
, boost
|
|
|
|
, zlib
|
|
|
|
, libX11
|
|
|
|
, libICE
|
|
|
|
, libSM
|
|
|
|
, libpng
|
|
|
|
, libjpeg
|
|
|
|
, libtiff
|
2024-06-05 15:53:02 +00:00
|
|
|
, pkg-config
|
|
|
|
, SDL2
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "povray";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "3.8.0-beta.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "POV-Ray";
|
|
|
|
repo = "povray";
|
2024-06-05 15:53:02 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
|
|
|
sha256 = "sha256-BsWalXzEnymiRbBfE/gsNyWgAqzbxEzO/EQiJpbwoKs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
automake
|
|
|
|
autoconf
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
boost
|
|
|
|
libX11
|
|
|
|
libICE
|
|
|
|
libSM
|
|
|
|
libpng
|
|
|
|
libjpeg
|
|
|
|
libtiff
|
|
|
|
SDL2
|
|
|
|
zlib
|
|
|
|
];
|
2020-04-24 23:36:52 +00: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
|
|
|
|
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}
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
configureFlags = [
|
|
|
|
"COMPILED_BY=NixOS"
|
|
|
|
"--with-boost-thread=boost_thread"
|
|
|
|
"--with-x"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir "$TMP/bin"
|
|
|
|
for i in chown chgrp; do
|
|
|
|
echo '#!${stdenv.shell}' >> "$TMP/bin/$i"
|
|
|
|
chmod +x "$TMP/bin/$i"
|
|
|
|
PATH="$TMP/bin:$PATH"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
meta = {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://www.povray.org/";
|
|
|
|
description = "Persistence of Vision Raytracer";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = lib.licenses.free;
|
|
|
|
platforms = lib.platforms.linux;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "povray";
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with lib.maintainers; [ fgaz ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2024-06-05 15:53:02 +00:00
|
|
|
})
|