[PATCH 0/2] gnu: sc-controller: Update to 0.5.2.

  • Done
  • quality assurance status badge
Details
3 participants
  • Morgan Smith
  • Andreas Enge
  • Liliana Marie Prikler
Owner
unassigned
Submitted by
Morgan Smith
Severity
normal

Debbugs page

M
M
Morgan Smith wrote on 10 Jul 12:36 -0700
(address . guix-patches@gnu.org)(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)
CH3PR84MB342481ADB15751832D88D7CDC548A@CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM
Hello!

Everything seems to work great on my computer.

This bug might be related to debbugs bug#78793 and to

Thanks,

Morgan

Morgan Smith (2):
gnu: Add python-ioctl-opt.
gnu: sc-controller: Update to 0.5.2.

gnu/packages/games.scm | 183 ++++++++++++++++++------------------
gnu/packages/python-xyz.scm | 18 ++++
2 files changed, 109 insertions(+), 92 deletions(-)


base-commit: 13cd6c9a1386533e62780c19a8eb57d01ef4eea8
--
2.50.0
M
M
Morgan Smith wrote on 10 Jul 12:45 -0700
[PATCH 1/2] gnu: Add python-ioctl-opt.
(address . 78993@debbugs.gnu.org)(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)
CH3PR84MB342445F2E7815FB9CE6755F7C548A@CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM
* gnu/packages/python-xyz.scm (python-ioctl-opt): New variable.

Change-Id: I5eef30444528fa722a12268a58c956993dcd47d1
---
gnu/packages/python-xyz.scm | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)

Toggle diff (31 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 4a3f0aa9ea7..c1bce966a37 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -32071,6 +32071,24 @@ (define-public python-iocapture
standard error channel (stderr) in your program.")
(license license:expat))))
+(define-public python-ioctl-opt
+ (package
+ (name "python-ioctl-opt")
+ (version "1.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "ioctl-opt" version))
+ (sha256
+ (base32 "1ygjgkzn0i61zk2yr27aqnma08c8xpblhdixli9f20if1nlgkm2y"))))
+ (build-system pyproject-build-system)
+ (native-inputs (list python-setuptools python-wheel))
+ (home-page "http://github.com/vpelletier/python-ioctl-opt")
+ (synopsis "Functions to compute fnctl.ioctl's opt argument")
+ (description
+ "This package provides functions to compute fnctl.ioctl's opt argument.")
+ (license license:gpl2+)))
+
(define-public python-anyio
(package
(name "python-anyio")
--
2.50.0
M
M
Morgan Smith wrote on 10 Jul 12:45 -0700
[PATCH 2/2] gnu: sc-controller: Update to 0.5.2.
(address . 78993@debbugs.gnu.org)(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)
CH3PR84MB3424AB5A5D8830F44E86EAB8C548A@CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM
* gnu/packages/games.scm (sc-controller): Update to 0.5.2.
[build-system]: Switch to pyproject-build-system.
[phases]: Run some gtk phases from the glib-or-gtk-build-system.
[inputs]: Add python-evdev, and python-ioctl-opt.
[native-inputs]: Add test dependencies.

Change-Id: I0c8cad17404113696c9c475bd6f942b95d986ef0
---
gnu/packages/games.scm | 183 ++++++++++++++++++++---------------------
1 file changed, 91 insertions(+), 92 deletions(-)

Toggle diff (211 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 7100445454f..8f2e6012a09 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -13108,104 +13108,105 @@ (define-public xmahjongg
(define-public sc-controller
(package
(name "sc-controller")
- (version "0.4.8.9")
+ (version "0.5.2")
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/Ryochan7/sc-controller")
+ (url "https://github.com/C0rn3j/sc-controller")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
- "1410yj6947yq43wwrj3cwllalalggzmd74sad70jd1niwj85yvna"
- ))))
- (build-system python-build-system)
+ "1zczdaxf76n1h6v3daaml7zd2ga808sscfp4bhnagfvw8y3xbf63"))))
+ (build-system pyproject-build-system)
(arguments
- (list #:phases #~(modify-phases %standard-phases
- (delete 'sanity-check)
- (add-after 'unpack 'remove-bundled-libraries
- (lambda _
- (with-directory-excursion "scc/lib"
- (for-each delete-file
- '("enum.py" "jsonencoder.py"
- "libusb1.py" "usb1.py")))
- ;; libusb1 fixes
- (substitute* '("scc/uinput.py"
- "scc/drivers/usb.py"
- "scc/drivers/steamdeck.py"
- "scc/drivers/sc_by_cable.py")
- (("scc\\.lib\\.libusb1")
- "libusb1")
- (("scc\\.lib\\.usb1")
- "usb1")
- (("from scc\\.lib import usb1")
- "import usb1"))
- ;; enum fixes
- (substitute* "scc/cemuhook_server.py"
- (("scc\\.lib\\.enum")
- "enum"))
- ;; simplejson fixes
- (substitute* "scc/profile.py"
- (("from scc\\.lib\\.jsonencoder")
- "from simplejson"))))
- (add-after 'unpack 'fix-paths
- (lambda _
- (substitute* "scc/lib/xwrappers.py"
- (("libXfixes.so")
- (string-append (assoc-ref %build-inputs
- "libxfixes")
- "/lib/libXfixes.so"))
- (("libXext.so")
- (string-append (assoc-ref %build-inputs
- "libxext")
- "/lib/libXext.so")))
- (substitute* "scc/lib/eudevmonitor.py"
- (("libudev.so")
- (string-append (assoc-ref %build-inputs "eudev")
- "/lib/libudev.so")))
- (substitute* "scc/uinput.py"
- (("/usr/include")
- (string-append (assoc-ref %build-inputs
- "linux-libre-headers")
- "/include")))
- (substitute* '("scc/gui/app.py"
- "scc/osd/inputdisplay.py"
- "scc/paths.py")
- (("/usr/share/scc")
- (string-append #$output "/share/scc")))))
- (add-after 'wrap 'gi-wrap
- (lambda _
- (for-each (lambda (prog)
- (wrap-program (string-append #$output
- "/bin/"
- prog)
- `("GI_TYPELIB_PATH" =
- (,(getenv
- "GI_TYPELIB_PATH")))))
- '("sc-controller" "scc"
- "scc-daemon"
- "scc-osd-dialog"
- "scc-osd-keyboard"
- "scc-osd-launcher"
- "scc-osd-menu"
- "scc-osd-message"
- "scc-osd-radial-menu"
- "scc-osd-show-bindings")))))))
- (inputs (list bash-minimal
- gtk+
- gtk-layer-shell
- eudev
- libxext
- libxfixes
- linux-libre-headers
- python-pycairo
- python-evdev
- python-libusb1
- python-pylibacl
- python-pygobject
- python-simplejson
- python-vdf
- zlib))
+ (list
+ #:imported-modules `((guix build glib-or-gtk-build-system)
+ ,@%pyproject-build-system-modules)
+ #:modules '((guix build pyproject-build-system)
+ ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
+ (guix build utils))
+ #:phases #~(modify-phases %standard-phases
+ (delete 'sanity-check)
+ (add-after 'unpack 'generate-gdk-pixbuf-loaders-cache-file
+ (assoc-ref glib-or-gtk:%standard-phases 'generate-gdk-pixbuf-loaders-cache-file))
+ (add-before 'build 'no-install-udev
+ (lambda _
+ ;; Installing udev rules errors out. Install them manually later
+ (substitute* "setup.py"
+ ((".*lib/udev.*") ""))))
+ (add-before 'build 'set-version
+ (lambda _
+ (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)))
+ (add-after 'unpack 'remove-bundled-libraries
+ (lambda _
+ (delete-file "scc/lib/jsonencoder.py")
+ (substitute* "scc/profile.py"
+ (("from scc\\.lib\\.jsonencoder")
+ "from simplejson"))))
+ (add-after 'unpack 'fix-paths
+ (lambda _
+ (substitute* '("scc/lib/xwrappers.py"
+ "scc/lib/eudevmonitor.py")
+ (("libXfixes\\.so|libXext\\.so|libudev\\.so" library)
+ (search-input-file %build-inputs (string-append "lib/" library))))
+ (substitute* "scc/uinput.py"
+ (("/usr/include")
+ (string-append (assoc-ref %build-inputs
+ "linux-libre-headers")
+ "/include")))
+ (substitute* '("scc/gui/app.py"
+ "scc/osd/inputdisplay.py"
+ "scc/paths.py")
+ (("/usr/share/scc")
+ (string-append #$output "/share/scc")))))
+ (add-after 'install 'install-udev
+ (lambda _
+ (for-each
+ (lambda (udev-rule)
+ (install-file udev-rule
+ (string-append
+ #$output
+ "/lib/udev/rules.d")))
+ (find-files "./scripts" "\\.rules$"))))
+ (add-after 'install 'glib-or-gtk-compile-schemas
+ (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
+ (add-after 'wrap 'glib-or-gtk-wrap
+ (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
+ (add-after 'glib-or-gtk-wrap 'gi-wrap
+ (lambda _
+ (let ((bin (string-append #$output "/bin")))
+ (for-each (lambda (prog)
+ (wrap-program prog
+ `("GDK_PIXBUF_MODULE_FILE" =
+ (,(getenv "GDK_PIXBUF_MODULE_FILE")))
+ `("GI_TYPELIB_PATH" =
+ (,(getenv "GI_TYPELIB_PATH")))))
+ ;; Predicate regex so we don't wrap the existing wrappers
+ (find-files bin "^[^.]"))))))))
+ (inputs (list
+ bash-minimal
+ eudev
+ gtk+
+ gtk-layer-shell
+ libxext
+ libxfixes
+ linux-libre-headers
+ python-evdev
+ python-ioctl-opt
+ python-libusb1
+ python-pycairo
+ python-pygobject
+ python-pylibacl
+ python-simplejson
+ python-vdf
+ zlib))
+ (native-inputs
+ (list
+ python-pytest
+ python-setuptools
+ python-setuptools-scm
+ python-wheel))
(home-page "https://github.com/Ryochan7/sc-controller")
(synopsis "Driver and configuration tool for game controllers")
(description
@@ -13213,8 +13214,6 @@ (define-public sc-controller
the Steam Controller, Steam Deck, and Dual Shock 4. Install the included udev
rules to solve permissions issues.")
(license (list
- ;; lib/enum.py, lib/usb1.py, and lib/libusb1.py are deleted but
- ;; do have other licenses.
license:cc0 ; images/*, default_profiles/*, profile_examples/*, default_menus/*
license:zlib ; scripts/gamecontrollerdb.txt
license:gpl2)))) ; everything else
--
2.50.0
L
L
Liliana Marie Prikler wrote on 10 Jul 22:44 -0700
b074dd78d93e0e6631db9bef4ed71f309bc90c34.camel@gmail.com
Am Donnerstag, dem 10.07.2025 um 15:45 -0400 schrieb Morgan Smith:
Toggle quote (1 lines)
> * gnu/packages/games.scm (sc-controller): Update to 0.5.2.
Mention the change in the source.
Toggle quote (2 lines)
> [build-system]: Switch to pyproject-build-system.
> [phases]: Run some gtk phases from the glib-or-gtk-build-system.
Name those phases explicitly.
Toggle quote (1 lines)
> [inputs]: Add python-evdev, and python-ioctl-opt.
This comma may be gratuitous.
Toggle quote (4 lines)
> [native-inputs]: Add test dependencies.
>
> Change-Id: I0c8cad17404113696c9c475bd6f942b95d986ef0
> ---
Otherwise LGTM.
M
M
Morgan Smith wrote on 11 Jul 11:25 -0700
[PATCH v2 1/2] gnu: Add python-ioctl-opt.
(address . 78993@debbugs.gnu.org)(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)
CH3PR84MB34240B62DBC989529B9855EEC54BA@CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM
* gnu/packages/python-xyz.scm (python-ioctl-opt): New variable.

Change-Id: I5eef30444528fa722a12268a58c956993dcd47d1
---
gnu/packages/python-xyz.scm | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 4a3f0aa9ea7..c1bce966a37 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -32071,6 +32071,24 @@ (define-public python-iocapture
standard error channel (stderr) in your program.")
(license license:expat))))
+(define-public python-ioctl-opt
+ (package
+ (name "python-ioctl-opt")
+ (version "1.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "ioctl-opt" version))
+ (sha256
+ (base32 "1ygjgkzn0i61zk2yr27aqnma08c8xpblhdixli9f20if1nlgkm2y"))))
+ (build-system pyproject-build-system)
+ (native-inputs (list python-setuptools python-wheel))
+ (home-page "http://github.com/vpelletier/python-ioctl-opt")
+ (synopsis "Functions to compute fnctl.ioctl's opt argument")
+ (description
+ "This package provides functions to compute fnctl.ioctl's opt argument.")
+ (license license:gpl2+)))
+
(define-public python-anyio
(package
(name "python-anyio")

base-commit: d31a92c6242145724783b692941545384fd71bc4
--
2.50.0
M
M
Morgan Smith wrote on 11 Jul 11:25 -0700
[PATCH v2 2/2] gnu: sc-controller: Update to 0.5.2.
(address . 78993@debbugs.gnu.org)(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)
CH3PR84MB3424E5443C02DCDD2972CBF4C54BA@CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM
* gnu/packages/games.scm (sc-controller): Update to 0.5.2.
[source]: Switch to maintained fork of project.
[build-system]: Switch to pyproject-build-system.
[phases]: Run the following phases from the glib-or-gtk-build-system:
generate-gdk-pixbuf-loaders-cache-file, glib-or-gtk-compile-schemas,
glib-or-gtk-wrap.
[inputs]: Add python-evdev and python-ioctl-opt.
[native-inputs]: Add test dependencies.

Change-Id: I0c8cad17404113696c9c475bd6f942b95d986ef0
---
gnu/packages/games.scm | 183 ++++++++++++++++++++---------------------
1 file changed, 91 insertions(+), 92 deletions(-)

Toggle diff (211 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 1e3295bc7ce..8349011c2c3 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -13108,104 +13108,105 @@ (define-public xmahjongg
(define-public sc-controller
(package
(name "sc-controller")
- (version "0.4.8.9")
+ (version "0.5.2")
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/Ryochan7/sc-controller")
+ (url "https://github.com/C0rn3j/sc-controller")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
- "1410yj6947yq43wwrj3cwllalalggzmd74sad70jd1niwj85yvna"
- ))))
- (build-system python-build-system)
+ "1zczdaxf76n1h6v3daaml7zd2ga808sscfp4bhnagfvw8y3xbf63"))))
+ (build-system pyproject-build-system)
(arguments
- (list #:phases #~(modify-phases %standard-phases
- (delete 'sanity-check)
- (add-after 'unpack 'remove-bundled-libraries
- (lambda _
- (with-directory-excursion "scc/lib"
- (for-each delete-file
- '("enum.py" "jsonencoder.py"
- "libusb1.py" "usb1.py")))
- ;; libusb1 fixes
- (substitute* '("scc/uinput.py"
- "scc/drivers/usb.py"
- "scc/drivers/steamdeck.py"
- "scc/drivers/sc_by_cable.py")
- (("scc\\.lib\\.libusb1")
- "libusb1")
- (("scc\\.lib\\.usb1")
- "usb1")
- (("from scc\\.lib import usb1")
- "import usb1"))
- ;; enum fixes
- (substitute* "scc/cemuhook_server.py"
- (("scc\\.lib\\.enum")
- "enum"))
- ;; simplejson fixes
- (substitute* "scc/profile.py"
- (("from scc\\.lib\\.jsonencoder")
- "from simplejson"))))
- (add-after 'unpack 'fix-paths
- (lambda _
- (substitute* "scc/lib/xwrappers.py"
- (("libXfixes.so")
- (string-append (assoc-ref %build-inputs
- "libxfixes")
- "/lib/libXfixes.so"))
- (("libXext.so")
- (string-append (assoc-ref %build-inputs
- "libxext")
- "/lib/libXext.so")))
- (substitute* "scc/lib/eudevmonitor.py"
- (("libudev.so")
- (string-append (assoc-ref %build-inputs "eudev")
- "/lib/libudev.so")))
- (substitute* "scc/uinput.py"
- (("/usr/include")
- (string-append (assoc-ref %build-inputs
- "linux-libre-headers")
- "/include")))
- (substitute* '("scc/gui/app.py"
- "scc/osd/inputdisplay.py"
- "scc/paths.py")
- (("/usr/share/scc")
- (string-append #$output "/share/scc")))))
- (add-after 'wrap 'gi-wrap
- (lambda _
- (for-each (lambda (prog)
- (wrap-program (string-append #$output
- "/bin/"
- prog)
- `("GI_TYPELIB_PATH" =
- (,(getenv
- "GI_TYPELIB_PATH")))))
- '("sc-controller" "scc"
- "scc-daemon"
- "scc-osd-dialog"
- "scc-osd-keyboard"
- "scc-osd-launcher"
- "scc-osd-menu"
- "scc-osd-message"
- "scc-osd-radial-menu"
- "scc-osd-show-bindings")))))))
- (inputs (list bash-minimal
- gtk+
- gtk-layer-shell
- eudev
- libxext
- libxfixes
- linux-libre-headers
- python-pycairo
- python-evdev
- python-libusb1
- python-pylibacl
- python-pygobject
- python-simplejson
- python-vdf
- zlib))
+ (list
+ #:imported-modules `((guix build glib-or-gtk-build-system)
+ ,@%pyproject-build-system-modules)
+ #:modules '((guix build pyproject-build-system)
+ ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
+ (guix build utils))
+ #:phases #~(modify-phases %standard-phases
+ (delete 'sanity-check)
+ (add-after 'unpack 'generate-gdk-pixbuf-loaders-cache-file
+ (assoc-ref glib-or-gtk:%standard-phases 'generate-gdk-pixbuf-loaders-cache-file))
+ (add-before 'build 'no-install-udev
+ (lambda _
+ ;; Installing udev rules errors out. Install them manually later
+ (substitute* "setup.py"
+ ((".*lib/udev.*") ""))))
+ (add-before 'build 'set-version
+ (lambda _
+ (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)))
+ (add-after 'unpack 'remove-bundled-libraries
+ (lambda _
+ (delete-file "scc/lib/jsonencoder.py")
+ (substitute* "scc/profile.py"
+ (("from scc\\.lib\\.jsonencoder")
+ "from simplejson"))))
+ (add-after 'unpack 'fix-paths
+ (lambda _
+ (substitute* '("scc/lib/xwrappers.py"
+ "scc/lib/eudevmonitor.py")
+ (("libXfixes\\.so|libXext\\.so|libudev\\.so" library)
+ (search-input-file %build-inputs (string-append "lib/" library))))
+ (substitute* "scc/uinput.py"
+ (("/usr/include")
+ (string-append (assoc-ref %build-inputs
+ "linux-libre-headers")
+ "/include")))
+ (substitute* '("scc/gui/app.py"
+ "scc/osd/inputdisplay.py"
+ "scc/paths.py")
+ (("/usr/share/scc")
+ (string-append #$output "/share/scc")))))
+ (add-after 'install 'install-udev
+ (lambda _
+ (for-each
+ (lambda (udev-rule)
+ (install-file udev-rule
+ (string-append
+ #$output
+ "/lib/udev/rules.d")))
+ (find-files "./scripts" "\\.rules$"))))
+ (add-after 'install 'glib-or-gtk-compile-schemas
+ (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
+ (add-after 'wrap 'glib-or-gtk-wrap
+ (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
+ (add-after 'glib-or-gtk-wrap 'gi-wrap
+ (lambda _
+ (let ((bin (string-append #$output "/bin")))
+ (for-each (lambda (prog)
+ (wrap-program prog
+ `("GDK_PIXBUF_MODULE_FILE" =
+ (,(getenv "GDK_PIXBUF_MODULE_FILE")))
+ `("GI_TYPELIB_PATH" =
+ (,(getenv "GI_TYPELIB_PATH")))))
+ ;; Predicate regex so we don't wrap the existing wrappers
+ (find-files bin "^[^.]"))))))))
+ (inputs (list
+ bash-minimal
+ eudev
+ gtk+
+ gtk-layer-shell
+ libxext
+ libxfixes
+ linux-libre-headers
+ python-evdev
+ python-ioctl-opt
+ python-libusb1
+ python-pycairo
+ python-pygobject
+ python-pylibacl
+ python-simplejson
+ python-vdf
+ zlib))
+ (native-inputs
+ (list
+ python-pytest
+ python-setuptools
+ python-setuptools-scm
+ python-wheel))
(home-page "https://github.com/Ryochan7/sc-controller")
(synopsis "Driver and configuration tool for game controllers")
(description
@@ -13213,8 +13214,6 @@ (define-public sc-controller
the Steam Controller, Steam Deck, and Dual Shock 4. Install the included udev
rules to solve permissions issues.")
(license (list
- ;; lib/enum.py, lib/usb1.py, and lib/libusb1.py are deleted but
- ;; do have other licenses.
license:cc0 ; images/*, default_profiles/*, profile_examples/*, default_menus/*
license:zlib ; scripts/gamecontrollerdb.txt
license:gpl2)))) ; everything else
--
2.50.0
A
A
Andreas Enge wrote on 12 Jul 03:05 -0700
Re: [PATCH v2 1/2] gnu: Add python-ioctl-opt.
(name . Morgan Smith)(address . Morgan.J.Smith@outlook.com)
aHIzabaMBeUo-c_q@jurong
Hello Morgan,

thanks for the updates and fixes, and for researching related issues.
I am going to push your commits.

Fredrik, I am also closing your issue; if it is not fixed, please feel
free to reopen it or to file a new one on codeberg.

Andreas
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 78993@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 78993
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch