58 stdenv.mkDerivation rec {
63 url = "https://github.com/darktable-org/darktable/releases/download/release-${version}/darktable-${version}.tar.xz";
64 sha256 = "sha256-Fu3AoHApPi082k6hDkm9qb3pMuI/nmLi+i56x0rPev0=";
67 nativeBuildInputs = [ cmake ninja llvmPackages.llvm pkg-config intltool perl desktop-file-utils wrapGAppsHook ];
97 gnome.adwaita-icon-theme
109 ] ++ lib.optionals stdenv.isLinux [
114 ] ++ lib.optional stdenv.isDarwin gtk-mac-integration
115 ++ lib.optional stdenv.cc.isClang llvmPackages.openmp;
118 "-DBUILD_USERMANUAL=False"
119 ] ++ lib.optionals stdenv.isDarwin [
124 # darktable changed its rpath handling in commit
125 # 83c70b876af6484506901e6b381304ae0d073d3c and as a result the
126 # binaries can't find libdarktable.so, so change LD_LIBRARY_PATH in
130 libPathEnvVar = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH";
131 libPathPrefix = "$out/lib/darktable" + lib.optionalString stdenv.isLinux ":${ocl-icd}/lib";
134 for f in $out/share/darktable/kernels/*.cl; do
135 sed -r "s|#include \"(.*)\"|#include \"$out/share/darktable/kernels/\1\"|g" -i "$f"
139 --prefix ${libPathEnvVar} ":" "${libPathPrefix}"
144 description = "Virtual lighttable and darkroom for photographers";
145 homepage = "https://www.darktable.org";
146 license = licenses.gpl3Plus;
147 platforms = platforms.linux ++ platforms.darwin;
148 maintainers = with maintainers; [ goibhniu flosse mrVanDalo paperdigits freyacodes ];