mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 09:04:17 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
67 lines
1.3 KiB
Nix
67 lines
1.3 KiB
Nix
{ cmake
|
|
, fetchFromGitHub
|
|
, freetype
|
|
, ilmbase
|
|
, lib
|
|
, libjpeg
|
|
, libtiff
|
|
, libxml2
|
|
, opencv
|
|
, openexr
|
|
, pkg-config
|
|
, stdenv
|
|
, swig
|
|
, zlib
|
|
, withPython ? true, python3
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "libyafaray";
|
|
version = "unstable-2022-09-17";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "YafaRay";
|
|
repo = "libYafaRay";
|
|
rev = "6e8c45fb150185b3356220e5f99478f20408ee49";
|
|
sha256 = "sha256-UVBA1vXOuLg4RT+BdF4rhbZ6I9ySeZX0N81gh3MH84I=";
|
|
};
|
|
|
|
postPatch = ''
|
|
sed '1i#include <memory>' -i \
|
|
include/geometry/poly_double.h include/noise/noise_generator.h # gcc12
|
|
'';
|
|
|
|
preConfigure = ''
|
|
NIX_CFLAGS_COMPILE+=" -isystem ${ilmbase.dev}/include/OpenEXR"
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
freetype
|
|
ilmbase
|
|
libjpeg
|
|
libtiff
|
|
libxml2
|
|
opencv
|
|
openexr
|
|
swig
|
|
zlib
|
|
] ++ lib.optional withPython python3;
|
|
|
|
meta = with lib; {
|
|
description = "Free, open source raytracer";
|
|
downloadPage = "https://github.com/YafaRay/libYafaRay";
|
|
homepage = "http://www.yafaray.org";
|
|
maintainers = with maintainers; [ hodapp ];
|
|
license = licenses.lgpl21;
|
|
platforms = [ "aarch64-linux" "x86_64-linux" ];
|
|
};
|
|
}
|
|
|
|
# TODO: Add optional Ruby support
|
|
# TODO: Add Qt support? (CMake looks for it, but what for?)
|