xorg.scm (2390B)
1 (define-module (epistemia packages xorg) 2 #:use-module (guix gexp) 3 #:use-module (guix packages) 4 #:use-module (guix utils) 5 #:use-module (gnu packages xdisorg) 6 #:use-module (gnu packages xorg)) 7 8 (define-public xorg-server-with-drivers 9 (package 10 (inherit xorg-server) 11 (name "xorg-server-with-drivers") 12 (arguments 13 (substitute-keyword-arguments (package-arguments xorg-server) 14 ((#:phases phases) 15 #~(modify-phases #$phases 16 (add-after 'install 'install-modules-conf 17 (lambda _ 18 ;; Add Xorg module paths so drivers in inputs are found. 19 (call-with-output-file 20 (string-append #$output "/share/X11/xorg.conf.d/00-modules.conf") 21 (lambda (port) 22 (display 23 (string-append 24 "Section \"Files\"\nModulePath \"" 25 #$output "/lib/xorg/modules," 26 #$(this-package-input "xf86-input-libinput") "/lib/xorg/modules," 27 #$(this-package-input "xf86-input-wacom") "/lib/xorg/modules," 28 #$(this-package-input "xf86-video-amdgpu") "/lib/xorg/modules\"\n" 29 "EndSection\n") 30 port))) 31 (call-with-output-file 32 (string-append #$output "/share/X11/xorg.conf.d/10-input.conf") 33 (lambda (port) 34 (display 35 (string-append 36 "Section \"InputClass\"\n" 37 " Identifier \"keyboards\"\n" 38 " MatchIsKeyboard \"on\"\n" 39 " Driver \"libinput\"\n" 40 "EndSection\n" 41 "\n" 42 "Section \"InputClass\"\n" 43 " Identifier \"mice\"\n" 44 " MatchIsPointer \"on\"\n" 45 " Driver \"libinput\"\n" 46 " Option \"AccelProfile\" \"flat\"\n" 47 " Option \"AccelSpeed\" \"0\"\n" 48 "EndSection\n" 49 "\n" 50 "Section \"InputClass\"\n" 51 " Identifier \"touchpads\"\n" 52 " MatchIsTouchpad \"on\"\n" 53 " Driver \"libinput\"\n" 54 " Option \"AccelProfile\" \"flat\"\n" 55 " Option \"AccelSpeed\" \"0\"\n" 56 " Option \"Tapping\" \"on\"\n" 57 " Option \"TappingButtonMap\" \"lrm\"\n" 58 "EndSection\n" 59 "\n" 60 "Section \"InputClass\"\n" 61 " Identifier \"wacom\"\n" 62 " MatchProduct \"Wacom\"\n" 63 " Driver \"wacom\"\n" 64 "EndSection\n") 65 port))))))))) 66 (inputs (modify-inputs (package-inputs xorg-server) 67 (append xf86-input-libinput 68 xf86-input-wacom 69 xf86-video-amdgpu)))))