openxray: 2188-november-2023-rc1 -> 2921-january-2025-rc1 (#375925)
[NixPkgs.git] / pkgs / applications / video / kodi / addons / controller-topology-project / default.nix
blobcb6028325f5bcec1c9ecb6c32a81b3d8a83edb2d
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   toKodiAddon,
6   addonDir,
7 }:
8 let
9   drv = stdenv.mkDerivation rec {
10     pname = "controller-topology-project";
11     version = "1.0.1";
13     src = fetchFromGitHub {
14       owner = "kodi-game";
15       repo = "controller-topology-project";
16       rev = "v${version}";
17       sha256 = "sha256-NRoI28LqXbsF6Icym98SWLHNl+WD8TsJ0P+ELf/JhyQ=";
18     };
20     postPatch = ''
21       # remove addons already included in the base kodi package
22       rm -r addons/game.controller.default
23       rm -r addons/game.controller.keyboard
24       rm -r addons/game.controller.mouse
25       rm -r addons/game.controller.snes
26     '';
28     installPhase = ''
29       runHook preInstall
30       mkdir -p $out${addonDir}
31       cp -r addons/* $out${addonDir}
32       runHook postInstall
33     '';
35     meta = with lib; {
36       homepage = "https://github.com/kodi-game/controller-topology-project";
37       description = "Models how controllers connect to and map to each other for all gaming history";
38       license = with licenses; [ odbl ];
39       maintainers = teams.kodi.members;
40     };
41   };
43 toKodiAddon drv