(define-module (epistemia packages xorg) #:use-module (guix gexp) #:use-module (guix packages) #:use-module (guix utils) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xorg)) (define-public xorg-server-with-drivers (package (inherit xorg-server) (name "xorg-server-with-drivers") (arguments (substitute-keyword-arguments (package-arguments xorg-server) ((#:phases phases) #~(modify-phases #$phases (add-after 'install 'install-modules-conf (lambda _ ;; Add Xorg module paths so drivers in inputs are found. (call-with-output-file (string-append #$output "/share/X11/xorg.conf.d/00-modules.conf") (lambda (port) (display (string-append "Section \"Files\"\nModulePath \"" #$output "/lib/xorg/modules," #$(this-package-input "xf86-input-libinput") "/lib/xorg/modules," #$(this-package-input "xf86-input-wacom") "/lib/xorg/modules," #$(this-package-input "xf86-video-amdgpu") "/lib/xorg/modules\"\n" "EndSection\n") port))) (call-with-output-file (string-append #$output "/share/X11/xorg.conf.d/10-input.conf") (lambda (port) (display (string-append "Section \"InputClass\"\n" " Identifier \"keyboards\"\n" " MatchIsKeyboard \"on\"\n" " Driver \"libinput\"\n" "EndSection\n" "\n" "Section \"InputClass\"\n" " Identifier \"mice\"\n" " MatchIsPointer \"on\"\n" " Driver \"libinput\"\n" " Option \"AccelProfile\" \"flat\"\n" " Option \"AccelSpeed\" \"0\"\n" "EndSection\n" "\n" "Section \"InputClass\"\n" " Identifier \"touchpads\"\n" " MatchIsTouchpad \"on\"\n" " Driver \"libinput\"\n" " Option \"AccelProfile\" \"flat\"\n" " Option \"AccelSpeed\" \"0\"\n" " Option \"Tapping\" \"on\"\n" " Option \"TappingButtonMap\" \"lrm\"\n" "EndSection\n" "\n" "Section \"InputClass\"\n" " Identifier \"wacom\"\n" " MatchProduct \"Wacom\"\n" " Driver \"wacom\"\n" "EndSection\n") port))))))))) (inputs (modify-inputs (package-inputs xorg-server) (append xf86-input-libinput xf86-input-wacom xf86-video-amdgpu)))))