37 stdenv.mkDerivation rec {
38 pname = "rawtherapee";
41 src = fetchFromGitHub {
45 hash = "sha256-jIAbguwF2aqRTk72ro5oHNTawA7biPSFC41YHgRR730=";
46 # The developpers ask not to use the tarball from Github releases, see
47 # https://www.rawtherapee.com/downloads/5.10/#news-relevant-to-package-maintainers
52 echo "set(HG_VERSION ${version})" > ReleaseInfo.cmake
53 substituteInPlace tools/osx/Info.plist.in rtgui/config.h.in \
54 --replace "/Applications" "${placeholder "out"}/Applications"
61 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
91 ] ++ lib.optionals stdenv.hostPlatform.isLinux [
93 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
98 "-DPROC_TARGET_NUMBER=2"
99 "-DCACHE_NAME_SUFFIX=\"\""
100 "-DWITH_SYSTEM_LIBRAW=\"ON\""
102 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
103 "-DCMAKE_OSX_DEPLOYMENT_TARGET=${stdenv.hostPlatform.darwinMinVersion}"
106 CMAKE_CXX_FLAGS = toString [
108 "-Wno-deprecated-declarations"
111 env.CXXFLAGS = "-include cstdint"; # needed at least with gcc13 on aarch64-linux
113 postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
114 mkdir -p $out/Applications/RawTherapee.app $out/bin
115 cp -R Release $out/Applications/RawTherapee.app/Contents
116 for f in $out/Applications/RawTherapee.app/Contents/MacOS/*; do
117 makeWrapper $f $out/bin/$(basename $f)
122 description = "RAW converter and digital photo processing software";
123 homepage = "http://www.rawtherapee.com/";
124 license = lib.licenses.gpl3Plus;
125 maintainers = with lib.maintainers; [ jcumming mahe ];
126 platforms = with lib.platforms; unix;