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
39 lines
1.1 KiB
Nix
39 lines
1.1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, opencv, zlib
|
|
, libxml2, freetype, libjpeg, libtiff, swig, openexr
|
|
, ilmbase, boost165
|
|
, withPython ? true, python3
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "yafaray-core";
|
|
version = "3.5.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "YafaRay";
|
|
repo = "Core";
|
|
rev = "v${version}";
|
|
sha256 = "043ixf3h4ay2fahsw9lh0pha82f7ri04mlfhvn2pg251012jvhrx";
|
|
};
|
|
|
|
preConfigure = ''
|
|
NIX_CFLAGS_COMPILE+=" -isystem ${ilmbase.dev}/include/OpenEXR"
|
|
'';
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
buildInputs = [
|
|
boost165 opencv zlib libxml2 freetype libjpeg libtiff
|
|
swig openexr ilmbase
|
|
] ++ stdenv.lib.optional withPython python3;
|
|
|
|
meta = with lib; {
|
|
description = "A free, open source raytracer";
|
|
homepage = "http://www.yafaray.org";
|
|
maintainers = with maintainers; [ hodapp ];
|
|
license = licenses.lgpl21;
|
|
platforms = [ "x86_64-linux" ];
|
|
};
|
|
}
|
|
|
|
# TODO: Add optional Ruby support
|
|
# TODO: Add Qt support? (CMake looks for it, but what for?)
|