2023-02-16 17:41:37 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
2024-09-19 14:19:46 +00:00
|
|
|
, util-linux
|
|
|
|
, libselinux
|
|
|
|
, libsepol
|
|
|
|
, lerc
|
|
|
|
, libthai
|
|
|
|
, libdatrie
|
|
|
|
, libxkbcommon
|
|
|
|
, libepoxy
|
|
|
|
, libXtst
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3
|
2023-02-16 17:41:37 +00:00
|
|
|
, makeWrapper
|
|
|
|
, pixman
|
|
|
|
, libpthreadstubs
|
|
|
|
, gtkmm3
|
|
|
|
, libXau
|
|
|
|
, libXdmcp
|
|
|
|
, lcms2
|
|
|
|
, libiptcdata
|
|
|
|
, fftw
|
|
|
|
, expat
|
2024-09-19 14:19:46 +00:00
|
|
|
, pcre2
|
2023-02-16 17:41:37 +00:00
|
|
|
, libsigcxx
|
|
|
|
, lensfun
|
|
|
|
, librsvg
|
|
|
|
, libcanberra-gtk3
|
|
|
|
, gtk-mac-integration
|
2024-02-29 20:09:43 +00:00
|
|
|
, exiv2
|
2024-09-19 14:19:46 +00:00
|
|
|
, libraw
|
|
|
|
, libjxl
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "rawtherapee";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "5.11";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Beep6581";
|
|
|
|
repo = "RawTherapee";
|
|
|
|
rev = version;
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-jIAbguwF2aqRTk72ro5oHNTawA7biPSFC41YHgRR730=";
|
2024-02-29 20:09:43 +00:00
|
|
|
# The developpers ask not to use the tarball from Github releases, see
|
|
|
|
# https://www.rawtherapee.com/downloads/5.10/#news-relevant-to-package-maintainers
|
|
|
|
forceFetchGit = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
postPatch = ''
|
|
|
|
echo "set(HG_VERSION ${version})" > ReleaseInfo.cmake
|
|
|
|
substituteInPlace tools/osx/Info.plist.in rtgui/config.h.in \
|
|
|
|
--replace "/Applications" "${placeholder "out"}/Applications"
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
2024-05-15 15:35:15 +00:00
|
|
|
wrapGAppsHook3
|
2023-02-16 17:41:37 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
makeWrapper
|
|
|
|
];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2024-09-19 14:19:46 +00:00
|
|
|
util-linux
|
|
|
|
libselinux
|
|
|
|
libsepol
|
|
|
|
lerc
|
|
|
|
libthai
|
|
|
|
libdatrie
|
|
|
|
libxkbcommon
|
|
|
|
libepoxy
|
|
|
|
libXtst
|
2023-02-16 17:41:37 +00:00
|
|
|
pixman
|
|
|
|
libpthreadstubs
|
|
|
|
gtkmm3
|
|
|
|
libXau
|
|
|
|
libXdmcp
|
|
|
|
lcms2
|
|
|
|
libiptcdata
|
|
|
|
fftw
|
|
|
|
expat
|
2024-09-19 14:19:46 +00:00
|
|
|
pcre2
|
2023-02-16 17:41:37 +00:00
|
|
|
libsigcxx
|
|
|
|
lensfun
|
|
|
|
librsvg
|
2024-02-29 20:09:43 +00:00
|
|
|
exiv2
|
2024-09-19 14:19:46 +00:00
|
|
|
libraw
|
|
|
|
libjxl
|
2022-08-12 12:06:08 +00:00
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
|
|
libcanberra-gtk3
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
gtk-mac-integration
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DPROC_TARGET_NUMBER=2"
|
|
|
|
"-DCACHE_NAME_SUFFIX=\"\""
|
2024-09-19 14:19:46 +00:00
|
|
|
"-DWITH_SYSTEM_LIBRAW=\"ON\""
|
|
|
|
"-DWITH_JXL=\"ON\""
|
2023-02-16 17:41:37 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
"-DCMAKE_OSX_DEPLOYMENT_TARGET=${stdenv.hostPlatform.darwinMinVersion}"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
CMAKE_CXX_FLAGS = toString [
|
|
|
|
"-std=c++11"
|
|
|
|
"-Wno-deprecated-declarations"
|
|
|
|
"-Wno-unused-result"
|
|
|
|
];
|
2024-02-07 01:22:34 +00:00
|
|
|
env.CXXFLAGS = "-include cstdint"; # needed at least with gcc13 on aarch64-linux
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
postInstall = lib.optionalString stdenv.isDarwin ''
|
|
|
|
mkdir -p $out/Applications/RawTherapee.app $out/bin
|
|
|
|
cp -R Release $out/Applications/RawTherapee.app/Contents
|
|
|
|
for f in $out/Applications/RawTherapee.app/Contents/MacOS/*; do
|
|
|
|
makeWrapper $f $out/bin/$(basename $f)
|
|
|
|
done
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "RAW converter and digital photo processing software";
|
|
|
|
homepage = "http://www.rawtherapee.com/";
|
2021-01-17 00:15:33 +00:00
|
|
|
license = lib.licenses.gpl3Plus;
|
|
|
|
maintainers = with lib.maintainers; [ jcumming mahe ];
|
2022-08-12 12:06:08 +00:00
|
|
|
platforms = with lib.platforms; unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|