modern_lisp-machine/packages/xpad.scm

47 lines
1.6 KiB
Scheme
Raw Permalink Normal View History

2024-06-01 05:00:40 +00:00
(use-modules (nongnu packages linux)
(guix build-system linux-module)
(guix git-download)
(guix packages)
(guix utils)
((guix licenses) #:prefix license:))
(define-public xpad-module
(package
(name "xpad-module")
(version "0.4")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/paroj/xpad")
(commit "3a215825f981643d164aa4e10fd2ab584fd9987c")))
(file-name (git-file-name name version))
(sha256
(base32
"1mh4ms5023bcj4ys3qkgchi68q1df4741pr4sv3cp4c3xf6g4ikr"))))
(build-system linux-module-build-system)
(arguments
(list #:tests? #f))
(home-page "https://github.com/paroj/xpad")
(synopsis
"Linux Kernel module for the Xbox/ Xbox 360/ Xbox One Controllers.")
(description
"Linux Kernel module for the Xbox/ Xbox 360/ Xbox One Controllers.")
(license license:gpl2+)))
;; kernel module need to be built against a specific kernel build
;; if you're using linux-6.1 you'd need to swap the default linux in the linux-module-buid-system,
;; and that's what we're doing here below:
;;
(define* (linux-libre-module->linux-module module #:optional (linux linux))
(package
(inherit module)
(arguments
(substitute-keyword-arguments (package-arguments module)
((#:linux _) linux)))))
(define xpad-module-for-linux-6.1
(linux-libre-module->linux-module xpad-module linux-6.1))
xpad-module-for-linux-6.1