diff mbox series

[bug#66597] gnu: Add sdl2-gamecontrollerdb.

Message ID 87edhoq5f3.fsf@pisemsky.com
State New
Headers show
Series [bug#66597] gnu: Add sdl2-gamecontrollerdb. | expand

Commit Message

Evgeny Pisemsky Oct. 20, 2023, 10:45 p.m. UTC
Hello!

The share path is not documented anywhere, I just used a package name to construct it.

There is no standard path where this database is expected to be, it must be specified.

I updated the patch with your recommendations and moved the package to the sdl module.

Comments

Liliana Marie Prikler Oct. 21, 2023, 8:05 p.m. UTC | #1
Am Samstag, dem 21.10.2023 um 01:45 +0300 schrieb Evgeny Pisemsky:

> +       "This package provides a community sourced database of game
> controller
> +mappings.  They supposed to be used with SDL2 Game Controller
> functionality.")
I've reworded this description locally to be grammatically correct and
also a bit snappier (the last one's my personal interpretation).

Otherwise LGTM so far.  Will build locally for testing purposes and
likely push next weekend.

Cheers
Liliana Marie Prikler Oct. 27, 2023, 2:35 p.m. UTC | #2
Am Samstag, dem 21.10.2023 um 22:05 +0200 schrieb Liliana Marie
Prikler:
> Am Samstag, dem 21.10.2023 um 01:45 +0300 schrieb Evgeny Pisemsky:
> 
> > +       "This package provides a community sourced database of game
> > controller
> > +mappings.  They supposed to be used with SDL2 Game Controller
> > functionality.")
> I've reworded this description locally to be grammatically correct
> and also a bit snappier (the last one's my personal interpretation).
> 
> Otherwise LGTM so far.  Will build locally for testing purposes and
> likely push next weekend.
Pushed now.

Cheers
diff mbox series

Patch

From 50a639bda381fadd41ed7ba0656cc4d09adb3c9c Mon Sep 17 00:00:00 2001
From: Evgeny Pisemsky <evgeny@pisemsky.com>
Date: Fri, 20 Oct 2023 23:23:23 +0300
Subject: [PATCH] gnu: Add sdl2-gamecontrollerdb.

* gnu/packages/sdl.scm (sdl2-gamecontrollerdb): New variable.
---
 gnu/packages/sdl.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index 11aa5e1602..79f0bd7c08 100644
--- a/gnu/packages/sdl.scm
+++ b/gnu/packages/sdl.scm
@@ -14,6 +14,7 @@ 
 ;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
 ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2023 Evgeny Pisemsky <evgeny@pisemsky.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -41,6 +42,7 @@  (define-module (gnu packages sdl)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix utils)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages audio)
@@ -563,6 +565,31 @@  (define-public sdl2-ttf
        (prepend harfbuzz freetype)))
     (properties '((upstream-name . "SDL2_ttf")))))
 
+(define-public sdl2-gamecontrollerdb
+  (let ((commit "6f3c4edcb5a2e2ed090ca8af40d2c0f00dcd77f6")
+        (revision "0"))
+    (package
+      (name "sdl2-gamecontrollerdb")
+      (version (git-version "0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/gabomdq/SDL_GameControllerDB")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1gciqc8qm2qgcjj5s9jpclznznsp6awl4ldrnj7g01chkcx0l6a3"))))
+      (build-system copy-build-system)
+      (arguments
+       '(#:install-plan '(("gamecontrollerdb.txt" "share/sdl2/"))))
+      (home-page "https://github.com/gabomdq/SDL_GameControllerDB")
+      (synopsis "SDL2 game controller database")
+      (description
+       "This package provides a community sourced database of game controller
+mappings.  They supposed to be used with SDL2 Game Controller functionality.")
+      (license license:zlib))))
+
 (define-public guile-sdl
   (package
     (name "guile-sdl")

base-commit: b3d0797d279b0aa48f6b652c149b7f974f3acc89
-- 
2.41.0