1{
2 lib,
3 stdenvNoCC,
4 fetchFromGitHub,
5 unstableGitUpdater,
6}:
7
8stdenvNoCC.mkDerivation (finalAttrs: {
9 pname = "sdl_gamecontrollerdb";
10 version = "0-unstable-2025-07-28";
11
12 src = fetchFromGitHub {
13 owner = "mdqinc";
14 repo = "SDL_GameControllerDB";
15 rev = "34765aa1de21323a873ab107a2a25e269e86b2e8";
16 hash = "sha256-K3XeSs6psR8RnDiYAKrVbx3KWQuJcD3RyZpOl+dn5Qw=";
17 };
18
19 dontBuild = true;
20 dontConfigure = true;
21
22 installPhase = ''
23 runHook preInstall
24
25 install -Dm644 gamecontrollerdb.txt -t $out/share
26 install -Dm644 LICENSE -t $out/share/licenses/sdl_gamecontrollerdb
27
28 runHook postInstall
29 '';
30
31 passthru.updateScript = unstableGitUpdater { };
32
33 meta = {
34 description = "Community sourced database of game controller mappings to be used with SDL2 and SDL3 Game Controller functionality";
35 homepage = "https://github.com/mdqinc/SDL_GameControllerDB";
36 license = lib.licenses.zlib;
37 maintainers = with lib.maintainers; [ qubitnano ];
38 platforms = lib.platforms.all;
39 };
40})