4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
50 lines
1.5 KiB
Nix
50 lines
1.5 KiB
Nix
{ lib, stdenv, fetchFromGitHub, autoconf, automake, boost
|
|
, zlib, libpng, libjpeg, libtiff, xlibsWrapper, SDL
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "povray";
|
|
version = "3.8.0-x.10064738";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "POV-Ray";
|
|
repo = "povray";
|
|
rev = "v${version}";
|
|
sha256 = "0hy5a3q5092szk2x3s9lpn1zkszgq9bp15rxzdncxlvnanyzsasf";
|
|
};
|
|
|
|
|
|
buildInputs = [ autoconf automake boost zlib libpng libjpeg libtiff xlibsWrapper 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}
|
|
'';
|
|
|
|
configureFlags = [ "COMPILED_BY='nix'" "--with-boost-thread=boost_thread" "--with-x" ];
|
|
|
|
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
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "http://www.povray.org/";
|
|
description = "Persistence of Vision Raytracer";
|
|
license = licenses.free;
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|