GNU bug report logs -
#50157
[PATCH] gnu: Add xpadneo.
Previous Next
Reported by: Leo Prikler <leo.prikler <at> student.tugraz.at>
Date: Sat, 21 Aug 2021 22:02:02 UTC
Severity: normal
Tags: patch
Done: Liliana Marie Prikler <leo.prikler <at> student.tugraz.at>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50157 in the body.
You can then email your comments to 50157 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#50157
; Package
guix-patches
.
(Sat, 21 Aug 2021 22:02:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Leo Prikler <leo.prikler <at> student.tugraz.at>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sat, 21 Aug 2021 22:02:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/linux.scm (xpadneo): New variable.
---
gnu/packages/linux.scm | 52 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 7b92be4b9c..385cdd558b 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1505,6 +1505,58 @@ allows some more serious things like adding streaming capabilities to an
application by hooking GStreamer into the loopback device.")
(license license:gpl2+)))
+(define-public xpadneo
+ (package
+ (name "xpadneo")
+ (version "0.9.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/atar-axis/xpadneo")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0xr0zx134s56h4ij6c3fh8ki0h58h61minbfxcl3sgpgxkh14ism"))))
+ (build-system linux-module-build-system)
+ (arguments
+ `(#:tests? #f ; no `check' target
+ #:modules (((guix build copy-build-system) #:prefix copy:)
+ (guix build linux-module-build-system)
+ (guix build utils))
+ #:imported-modules
+ ((guix build copy-build-system)
+ ,@%linux-module-build-system-modules)
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda args
+ (with-directory-excursion "hid-xpadneo/src"
+ (apply (assoc-ref %standard-phases 'configure) args))))
+ (replace 'build
+ (lambda args
+ (with-directory-excursion "hid-xpadneo/src"
+ (apply (assoc-ref %standard-phases 'build) args))))
+ (replace 'install
+ (lambda args
+ (with-directory-excursion "hid-xpadneo/src"
+ (apply (assoc-ref %standard-phases 'install) args))))
+ (add-after 'install 'post-install
+ (lambda* (#:key outputs #:allow-other-keys #:rest args)
+ (apply (assoc-ref copy:%standard-phases 'install)
+ #:install-plan
+ '(("hid-xpadneo/etc-modprobe.d" "etc/modprobe.d")
+ ("hid-xpadneo/etc-udev-rules.d" "etc/udev/rules.d"))
+ args))))))
+ (home-page "https://atar-axis.github.io/xpadneo/")
+ (synopsis "Xbox One Wireless Controller driver")
+ (description
+ "This package provides a driver for the XBox One S Wireless controller
+and some newer models when connected via bluetooth. In addition to the kernel
+module provided itself, it also contains a modprobe configuration and udev
+rules, which need to be installed separately.")
+ (license license:gpl3+)))
+
;;;
;;; Pluggable authentication modules (PAM).
--
2.33.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#50157
; Package
guix-patches
.
(Sun, 22 Aug 2021 09:59:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 50157 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Leo Prikler schreef op zo 22-08-2021 om 00:00 [+0200]:
> * gnu/packages/linux.scm (xpadneo): New variable.
> ---
> gnu/packages/linux.scm | 52 ++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 52 insertions(+)
>
> diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
> index 7b92be4b9c..385cdd558b 100644
> --- a/gnu/packages/linux.scm
> +++ b/gnu/packages/linux.scm
> @@ -1505,6 +1505,58 @@ allows some more serious things like adding streaming capabilities to an
> application by hooking GStreamer into the loopback device.")
> (license license:gpl2+)))
>
> +(define-public xpadneo
> + (package
> + (name "xpadneo")
> + (version "0.9.1")
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/atar-axis/xpadneo")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "0xr0zx134s56h4ij6c3fh8ki0h58h61minbfxcl3sgpgxkh14ism"))))
> + (build-system linux-module-build-system)
> + (arguments
> + `(#:tests? #f ; no `check' target
> + #:modules (((guix build copy-build-system) #:prefix copy:)
> + (guix build linux-module-build-system)
> + (guix build utils))
> + #:imported-modules
> + ((guix build copy-build-system)
> + ,@%linux-module-build-system-modules)
> + #:phases
> + (modify-phases %standard-phases
> + (replace 'configure
> + (lambda args
> + (with-directory-excursion "hid-xpadneo/src"
> + (apply (assoc-ref %standard-phases 'configure) args))))
> + (replace 'build
> + (lambda args
> + (with-directory-excursion "hid-xpadneo/src"
> + (apply (assoc-ref %standard-phases 'build) args))))
> + (replace 'install
> + (lambda args
> + (with-directory-excursion "hid-xpadneo/src"
> + (apply (assoc-ref %standard-phases 'install) args))))
It might be a bit simpler to add a 'chdir' phase:
(add-after 'unpack 'chdir
(lambda _
(chdir "hid-xpadneo/src")))
instead of these 'with-directory-excursion'.
Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#50157
; Package
guix-patches
.
(Sun, 22 Aug 2021 10:10:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 50157 <at> debbugs.gnu.org (full text, mbox):
Am Sonntag, den 22.08.2021, 11:58 +0200 schrieb Maxime Devos:
> Leo Prikler schreef op zo 22-08-2021 om 00:00 [+0200]:
> > * gnu/packages/linux.scm (xpadneo): New variable.
> > ---
> > gnu/packages/linux.scm | 52
> > ++++++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 52 insertions(+)
> >
> > diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
> > index 7b92be4b9c..385cdd558b 100644
> > --- a/gnu/packages/linux.scm
> > +++ b/gnu/packages/linux.scm
> > @@ -1505,6 +1505,58 @@ allows some more serious things like adding
> > streaming capabilities to an
> > application by hooking GStreamer into the loopback device.")
> > (license license:gpl2+)))
> >
> > +(define-public xpadneo
> > + (package
> > + (name "xpadneo")
> > + (version "0.9.1")
> > + (source (origin
> > + (method git-fetch)
> > + (uri (git-reference
> > + (url "https://github.com/atar-axis/xpadneo")
> > + (commit (string-append "v" version))))
> > + (file-name (git-file-name name version))
> > + (sha256
> > + (base32
> > + "0xr0zx134s56h4ij6c3fh8ki0h58h61minbfxcl3sgpgxkh14
> > ism"))))
> > + (build-system linux-module-build-system)
> > + (arguments
> > + `(#:tests? #f ; no `check' target
> > + #:modules (((guix build copy-build-system) #:prefix copy:)
> > + (guix build linux-module-build-system)
> > + (guix build utils))
> > + #:imported-modules
> > + ((guix build copy-build-system)
> > + ,@%linux-module-build-system-modules)
> > + #:phases
> > + (modify-phases %standard-phases
> > + (replace 'configure
> > + (lambda args
> > + (with-directory-excursion "hid-xpadneo/src"
> > + (apply (assoc-ref %standard-phases 'configure)
> > args))))
> > + (replace 'build
> > + (lambda args
> > + (with-directory-excursion "hid-xpadneo/src"
> > + (apply (assoc-ref %standard-phases 'build) args))))
> > + (replace 'install
> > + (lambda args
> > + (with-directory-excursion "hid-xpadneo/src"
> > + (apply (assoc-ref %standard-phases 'install)
> > args))))
>
> It might be a bit simpler to add a 'chdir' phase:
>
> (add-after 'unpack 'chdir
> (lambda _
> (chdir "hid-xpadneo/src")))
>
> instead of these 'with-directory-excursion'.
That may be true, but in that case there's no "clean" way of exiting.
I could do (chdir "..") in post-install, but that feels weird.
WDYT?
Information forwarded
to
guix-patches <at> gnu.org
:
bug#50157
; Package
guix-patches
.
(Sun, 22 Aug 2021 11:35:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 50157 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sun, Aug 22, 2021 at 12:08:57PM +0200, Leo Prikler wrote:
> Am Sonntag, den 22.08.2021, 11:58 +0200 schrieb Maxime Devos:
> > Leo Prikler schreef op zo 22-08-2021 om 00:00 [+0200]:
> > > * gnu/packages/linux.scm (xpadneo): New variable.
> > > ---
> > > gnu/packages/linux.scm | 52
> > > ++++++++++++++++++++++++++++++++++++++++++
> > > 1 file changed, 52 insertions(+)
> > >
> > > diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
> > > index 7b92be4b9c..385cdd558b 100644
> > > --- a/gnu/packages/linux.scm
> > > +++ b/gnu/packages/linux.scm
> > > @@ -1505,6 +1505,58 @@ allows some more serious things like adding
> > > streaming capabilities to an
> > > application by hooking GStreamer into the loopback device.")
> > > (license license:gpl2+)))
> > >
> > > +(define-public xpadneo
> > > + (package
> > > + (name "xpadneo")
> > > + (version "0.9.1")
> > > + (source (origin
> > > + (method git-fetch)
> > > + (uri (git-reference
> > > + (url "https://github.com/atar-axis/xpadneo")
> > > + (commit (string-append "v" version))))
> > > + (file-name (git-file-name name version))
> > > + (sha256
> > > + (base32
> > > + "0xr0zx134s56h4ij6c3fh8ki0h58h61minbfxcl3sgpgxkh14
> > > ism"))))
> > > + (build-system linux-module-build-system)
> > > + (arguments
> > > + `(#:tests? #f ; no `check' target
> > > + #:modules (((guix build copy-build-system) #:prefix copy:)
> > > + (guix build linux-module-build-system)
> > > + (guix build utils))
> > > + #:imported-modules
> > > + ((guix build copy-build-system)
> > > + ,@%linux-module-build-system-modules)
> > > + #:phases
> > > + (modify-phases %standard-phases
> > > + (replace 'configure
> > > + (lambda args
> > > + (with-directory-excursion "hid-xpadneo/src"
> > > + (apply (assoc-ref %standard-phases 'configure)
> > > args))))
> > > + (replace 'build
> > > + (lambda args
> > > + (with-directory-excursion "hid-xpadneo/src"
> > > + (apply (assoc-ref %standard-phases 'build) args))))
> > > + (replace 'install
> > > + (lambda args
> > > + (with-directory-excursion "hid-xpadneo/src"
> > > + (apply (assoc-ref %standard-phases 'install)
> > > args))))
> >
> > It might be a bit simpler to add a 'chdir' phase:
> >
> > (add-after 'unpack 'chdir
> > (lambda _
> > (chdir "hid-xpadneo/src")))
> >
> > instead of these 'with-directory-excursion'.
> That may be true, but in that case there's no "clean" way of exiting.
> I could do (chdir "..") in post-install, but that feels weird.
>
> WDYT?
>
Where is the license file located? You could add a phaes after 'install
to chdir back ".." and then just use install-file for the files for etc.
Then the 'install-license phase would also work correctly.
--
Efraim Flashner <efraim <at> flashner.co.il> רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#50157
; Package
guix-patches
.
(Sun, 22 Aug 2021 12:04:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 50157 <at> debbugs.gnu.org (full text, mbox):
Am Sonntag, den 22.08.2021, 14:32 +0300 schrieb Efraim Flashner:
> On Sun, Aug 22, 2021 at 12:08:57PM +0200, Leo Prikler wrote:
> > Am Sonntag, den 22.08.2021, 11:58 +0200 schrieb Maxime Devos:
> > > Leo Prikler schreef op zo 22-08-2021 om 00:00 [+0200]:
> > > > * gnu/packages/linux.scm (xpadneo): New variable.
> > > > ---
> > > > gnu/packages/linux.scm | 52
> > > > ++++++++++++++++++++++++++++++++++++++++++
> > > > 1 file changed, 52 insertions(+)
> > > >
> > > > diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
> > > > index 7b92be4b9c..385cdd558b 100644
> > > > --- a/gnu/packages/linux.scm
> > > > +++ b/gnu/packages/linux.scm
> > > > @@ -1505,6 +1505,58 @@ allows some more serious things like
> > > > adding
> > > > streaming capabilities to an
> > > > application by hooking GStreamer into the loopback device.")
> > > > (license license:gpl2+)))
> > > >
> > > > +(define-public xpadneo
> > > > + (package
> > > > + (name "xpadneo")
> > > > + (version "0.9.1")
> > > > + (source (origin
> > > > + (method git-fetch)
> > > > + (uri (git-reference
> > > > + (url "https://github.com/atar-axis/xpadneo
> > > > ")
> > > > + (commit (string-append "v" version))))
> > > > + (file-name (git-file-name name version))
> > > > + (sha256
> > > > + (base32
> > > > + "0xr0zx134s56h4ij6c3fh8ki0h58h61minbfxcl3sgpgx
> > > > kh14
> > > > ism"))))
> > > > + (build-system linux-module-build-system)
> > > > + (arguments
> > > > + `(#:tests? #f ; no `check' target
> > > > + #:modules (((guix build copy-build-system) #:prefix
> > > > copy:)
> > > > + (guix build linux-module-build-system)
> > > > + (guix build utils))
> > > > + #:imported-modules
> > > > + ((guix build copy-build-system)
> > > > + ,@%linux-module-build-system-modules)
> > > > + #:phases
> > > > + (modify-phases %standard-phases
> > > > + (replace 'configure
> > > > + (lambda args
> > > > + (with-directory-excursion "hid-xpadneo/src"
> > > > + (apply (assoc-ref %standard-phases 'configure)
> > > > args))))
> > > > + (replace 'build
> > > > + (lambda args
> > > > + (with-directory-excursion "hid-xpadneo/src"
> > > > + (apply (assoc-ref %standard-phases 'build)
> > > > args))))
> > > > + (replace 'install
> > > > + (lambda args
> > > > + (with-directory-excursion "hid-xpadneo/src"
> > > > + (apply (assoc-ref %standard-phases 'install)
> > > > args))))
> > >
> > > It might be a bit simpler to add a 'chdir' phase:
> > >
> > > (add-after 'unpack 'chdir
> > > (lambda _
> > > (chdir "hid-xpadneo/src")))
> > >
> > > instead of these 'with-directory-excursion'.
> > That may be true, but in that case there's no "clean" way of
> > exiting.
> > I could do (chdir "..") in post-install, but that feels weird.
> >
> > WDYT?
> >
>
> Where is the license file located? You could add a phaes after
> 'install
> to chdir back ".." and then just use install-file for the files for
> etc.
> Then the 'install-license phase would also work correctly.
The license file is at the root of the tree. FWIW, there is an ongoing
issue on whether to interpret the license as GPL3 or GPL3+ [1], which I
interpreted as the latter for a lack of file headers.
So in the chdir case, I would have to chdir two to three times,
depending on how much I want to type, leaving the CWD dirty between
phase changes. The directory-excursion hack is a little more verbose,
but mostly captures my intent and needs to be applied exactly thrice.
One could probably make it even smarter by writing a lambda for the
phase rewriting or instead provide build-system support for linux
modules in subdirectories. (Perhaps we could even add modify-phases
support to add "advice" to phases Emacs-style.)
Regards,
Leo
[1] https://github.com/atar-axis/xpadneo/issues/289
Information forwarded
to
guix-patches <at> gnu.org
:
bug#50157
; Package
guix-patches
.
(Thu, 26 Aug 2021 11:11:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 50157 <at> debbugs.gnu.org (full text, mbox):
As with guile-build-system, the module to be build need not necessarily live
at the root of the build tree.
* guix/build/linux-module-build-system.scm (build, install): Add
source-directory argument and append it to "M" variable when invoking make.
* guix/build-system/linux-module.scm (linux-module-build): Add
source-directory argument.
---
guix/build-system/linux-module.scm | 4 +++-
guix/build/linux-module-build-system.scm | 9 +++++----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/guix/build-system/linux-module.scm b/guix/build-system/linux-module.scm
index fc3d959ce7..33bc8c95df 100644
--- a/guix/build-system/linux-module.scm
+++ b/guix/build-system/linux-module.scm
@@ -158,6 +158,7 @@
(outputs '("out"))
(make-flags ''())
(system (%current-system))
+ (source-directory ".")
(guile #f)
(substitutable? #t)
(imported-modules
@@ -175,7 +176,8 @@
((source)
source)
(source
- source))
+ source))
+ #:source-directory ,source-directory
#:search-paths ',(map search-path-specification->sexp
search-paths)
#:phases ,phases
diff --git a/guix/build/linux-module-build-system.scm b/guix/build/linux-module-build-system.scm
index d51d76f94b..729ab6154f 100644
--- a/guix/build/linux-module-build-system.scm
+++ b/guix/build/linux-module-build-system.scm
@@ -49,16 +49,17 @@
; TODO: kernel ".config".
#t)
-(define* (build #:key inputs make-flags #:allow-other-keys)
+(define* (build #:key inputs make-flags (source-directory ".") #:allow-other-keys)
(apply invoke "make" "-C"
(string-append (assoc-ref inputs "linux-module-builder")
"/lib/modules/build")
- (string-append "M=" (getcwd))
+ (string-append "M=" (getcwd) "/" source-directory)
(or make-flags '())))
;; This block was copied from make-linux-libre--only took the "modules_install"
;; part.
-(define* (install #:key make-flags inputs native-inputs outputs
+(define* (install #:key make-flags (source-directory ".")
+ inputs native-inputs outputs
#:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(moddir (string-append out "/lib/modules")))
@@ -67,7 +68,7 @@
(apply invoke "make" "-C"
(string-append (assoc-ref inputs "linux-module-builder")
"/lib/modules/build")
- (string-append "M=" (getcwd))
+ (string-append "M=" (getcwd) "/" source-directory)
;; Disable depmod because the Guix system's module directory
;; is an union of potentially multiple packages. It is not
;; possible to use depmod to usefully calculate a dependency
--
2.33.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#50157
; Package
guix-patches
.
(Thu, 26 Aug 2021 11:11:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 50157 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/linux.scm (xpadneo): New variable.
---
gnu/packages/linux.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 7b92be4b9c..4383048403 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1505,6 +1505,41 @@ allows some more serious things like adding streaming capabilities to an
application by hooking GStreamer into the loopback device.")
(license license:gpl2+)))
+(define-public xpadneo
+ (package
+ (name "xpadneo")
+ (version "0.9.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/atar-axis/xpadneo")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0xr0zx134s56h4ij6c3fh8ki0h58h61minbfxcl3sgpgxkh14ism"))))
+ (build-system linux-module-build-system)
+ (arguments
+ `(#:tests? #f ; no `check' target
+ #:source-directory "hid-xpadneo/src"
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'post-install
+ (lambda* (#:key outputs #:allow-other-keys #:rest args)
+ (let ((out (assoc-ref outputs "out")))
+ (copy-recursively "hid-xpadneo/etc-modprobe.d"
+ (string-append out "/etc/modprobe.d"))
+ (copy-recursively "hid-xpadneo/etc-udev-rules.d"
+ (string-append out "/etc/udev/rules.d"))))))))
+ (home-page "https://atar-axis.github.io/xpadneo/")
+ (synopsis "Xbox One Wireless Controller driver")
+ (description
+ "This package provides a driver for the XBox One S Wireless controller
+and some newer models when connected via bluetooth. In addition to the kernel
+module provided itself, it also contains a modprobe configuration and udev
+rules, which need to be installed separately.")
+ (license license:gpl3+)))
+
;;;
;;; Pluggable authentication modules (PAM).
--
2.33.0
Reply sent
to
Liliana Marie Prikler <leo.prikler <at> student.tugraz.at>
:
You have taken responsibility.
(Tue, 14 Sep 2021 22:04:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Leo Prikler <leo.prikler <at> student.tugraz.at>
:
bug acknowledged by developer.
(Tue, 14 Sep 2021 22:04:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 50157-done <at> debbugs.gnu.org (full text, mbox):
Going by the lack of replies, I'll assume that v2 addressed all
concerns of v1 and therefore pushed this.
Regards
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 13 Oct 2021 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 167 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.