From 3eb30f32ab10898fff45461963da00cffc59cd2c Mon Sep 17 00:00:00 2001 From: Andrew Poelstra Date: Fri, 25 Jul 2025 00:10:34 +0000 Subject: [PATCH] rawtherapee: fix version information The existing version logic dates to 68a38d6c0fac3 (PR 18368 on September 25, 2016). But rawtherapee switched from hg to git around 2015, so these cmake variables were wrong almost as soon as they were set. Without this patch, running rawtherapee-cli --version has the output RawTherapee, version , command line. With this patch: RawTherapee, version 5.12, command line. which is significantly better, although personally I'd prefer to also have a git commit ID. --- pkgs/applications/graphics/rawtherapee/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/graphics/rawtherapee/default.nix b/pkgs/applications/graphics/rawtherapee/default.nix index 307e3cf403ba..e1d571e4dbd0 100644 --- a/pkgs/applications/graphics/rawtherapee/default.nix +++ b/pkgs/applications/graphics/rawtherapee/default.nix @@ -50,7 +50,15 @@ stdenv.mkDerivation rec { }; postPatch = '' - echo "set(HG_VERSION ${version})" > ReleaseInfo.cmake + cat < ReleaseInfo.cmake + set(GIT_DESCRIBE ${version}) + set(GIT_BRANCH ${version}) + set(GIT_VERSION ${version}) + # Missing GIT_COMMIT and GIT_COMMIT_DATE, which are not easy to obtain. + set(GIT_COMMITS_SINCE_TAG 0) + set(GIT_COMMITS_SINCE_BRANCH 0) + set(GIT_VERSION_NUMERIC_BS ${version}) + EOF substituteInPlace tools/osx/Info.plist.in rtgui/config.h.in \ --replace "/Applications" "${placeholder "out"}/Applications" '';