nixpkgs-suyu/pkgs/applications/graphics/mandelbulber/default.nix

65 lines
1.3 KiB
Nix
Raw Normal View History

{ lib
, mkDerivation
, fetchFromGitHub
, libpng
, gsl
, libsndfile
, lzo
, qmake
, qttools
, qtbase
, qtmultimedia
, withOpenCL ? true
, opencl-clhpp ? null
, ocl-icd ? null
}:
assert withOpenCL -> opencl-clhpp != null;
assert withOpenCL -> ocl-icd != null;
mkDerivation rec {
pname = "mandelbulber";
2020-07-08 12:16:34 +02:00
version = "2.22";
src = fetchFromGitHub {
owner = "buddhi1980";
repo = "mandelbulber2";
rev = version;
2020-07-08 12:16:34 +02:00
sha256 = "011y2nl0jakf29cxprjmj1ifqc9iva61q5f4kk47b03gq7jw8sl4";
};
nativeBuildInputs = [
qmake
qttools
];
buildInputs = [
qtbase
qtmultimedia
libpng
gsl
libsndfile
lzo
] ++ lib.optionals withOpenCL [
opencl-clhpp
ocl-icd
];
sourceRoot = "${src.name}/mandelbulber2";
qmakeFlags = [
"SHARED_PATH=${placeholder ''out''}"
(if withOpenCL
then "qmake/mandelbulber-opencl.pro"
else "qmake/mandelbulber.pro")
];
meta = with lib; {
description = "A 3D fractal rendering engine";
longDescription = "Mandelbulber creatively generates three-dimensional fractals. Explore trigonometric, hyper-complex, Mandelbox, IFS, and many other 3D fractals.";
homepage = "https://mandelbulber.com";
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ kovirobi ];
};
}