Skip to content

Commit 3bed64f

Browse files
committed
darktable: fix build by using Saxon XSLT processor
The build was failing due to inconsistent ID generation in XSLT transformations. The generate_prefs.xsl uses generate-id() which produces different IDs between function declarations and their usage when using libxslt. Switching to Saxon XSLT processor resolves this issue as it handles generate-id() more consistently.
1 parent fe5b2c2 commit 3bed64f

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

pkgs/by-name/da/darktable/package.nix

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
lib,
33
stdenv,
44
fetchurl,
5+
runCommand,
56

67
# nativeBuildInputs
78
cmake,
@@ -12,6 +13,7 @@
1213
perl,
1314
pkg-config,
1415
wrapGAppsHook3,
16+
saxon,
1517

1618
# buildInputs
1719
SDL2,
@@ -52,7 +54,6 @@
5254
libtiff,
5355
libwebp,
5456
libxml2,
55-
libxslt,
5657
lua,
5758
util-linux,
5859
openexr,
@@ -79,6 +80,17 @@
7980
gitUpdater,
8081
}:
8182

83+
let
84+
# Create a wrapper for saxon to provide saxon-xslt command
85+
saxon-xslt = runCommand "saxon-xslt" { } ''
86+
mkdir -p $out/bin
87+
cat > $out/bin/saxon-xslt << 'EOF'
88+
#!/bin/sh
89+
exec ${saxon}/bin/saxon "$@"
90+
EOF
91+
chmod +x $out/bin/saxon-xslt
92+
'';
93+
in
8294
stdenv.mkDerivation rec {
8395
version = "5.2.0";
8496
pname = "darktable";
@@ -97,6 +109,7 @@ stdenv.mkDerivation rec {
97109
perl
98110
pkg-config
99111
wrapGAppsHook3
112+
saxon-xslt # Use Saxon instead of libxslt to fix XSLT generate-id() consistency issues
100113
];
101114

102115
buildInputs =
@@ -138,7 +151,6 @@ stdenv.mkDerivation rec {
138151
libtiff
139152
libwebp
140153
libxml2
141-
libxslt
142154
lua
143155
openexr
144156
openjpeg

0 commit comments

Comments
 (0)