xdg-utils: make procmail optional when cross-compiling

This commit is contained in:
Jörg Thalheim 2024-05-24 15:02:55 +02:00
parent 3f316d2a50
commit 368fe3cd3b

View File

@ -167,7 +167,10 @@ let
{ {
scripts = [ "bin/xdg-screensaver" ]; scripts = [ "bin/xdg-screensaver" ];
interpreter = "${bash}/bin/bash"; interpreter = "${bash}/bin/bash";
inputs = commonDeps ++ [ nettools perl procmail procps ]; inputs = commonDeps ++ [ nettools perl procps ]
# procmail's funky build system is currently broken in cross-build.
# xdg-screensaver will gracefully degrade if it's not available.
++ lib.optional (stdenv.hostPlatform == stdenv.buildPlatform) procmail;
# These are desktop-specific, so we don't want xdg-utils to be able to # These are desktop-specific, so we don't want xdg-utils to be able to
# call them when in a different setup. # call them when in a different setup.
fake.external = commonFakes ++ [ fake.external = commonFakes ++ [
@ -176,7 +179,7 @@ let
"xautolock" # Xautolock "xautolock" # Xautolock
"xscreensaver-command" # Xscreensaver "xscreensaver-command" # Xscreensaver
"xset" # generic-ish X "xset" # generic-ish X
]; ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "lockfile"; # procmail
keep = { keep = {
"$MV" = true; "$MV" = true;
"$XPROP" = true; "$XPROP" = true;