From e6685186a5bbd5fecde4b4daa9d60eee35d2c783 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Fri, 26 Jun 2020 22:05:08 +0200 Subject: gnu: lxrandr: Depend on xrandr. * gnu/packages/lxde.scm (lxrandr)[arguments]: Substitute xrandr's absolute file name. Reported by pinoaffe on #guix. --- gnu/packages/lxde.scm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'gnu/packages/lxde.scm') diff --git a/gnu/packages/lxde.scm b/gnu/packages/lxde.scm index fbf32bf337..cad5282e1a 100644 --- a/gnu/packages/lxde.scm +++ b/gnu/packages/lxde.scm @@ -137,7 +137,19 @@ (define-public lxrandr (base32 "04n3vgh3ix12p8jfs4w0dyfq3anbjy33h7g53wbbqqc0f74xyplb")))) (build-system gnu-build-system) - (inputs `(("gtk+" ,gtk+-2))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'xrandr-absolutely + ;; lxrandr is useless without xrandr and gives an unhelpful error + ;; message if it's not in $PATH, so make it a hard dependency. + (lambda* (#:key input #:allow-other-keys) + (substitute* "src/lxrandr.c" + (("(\"|')xrandr\"" _ match) + (string-append match (which "xrandr") "\""))) + #t))))) + (inputs `(("gtk+" ,gtk+-2) + ("xrandr" ,xrandr))) (native-inputs `(("intltool" ,intltool) ("pkg-config" ,pkg-config))) (synopsis "LXDE monitor configuration tool") -- cgit v1.2.3