Files
nixpkgs/pkgs/by-name/ga/gamepad-tool/package.nix
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

54 lines
1.2 KiB
Nix

{
stdenvNoCC,
fetchurl,
dpkg,
lib,
qt5,
autoPatchelfHook,
SDL2,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "gamepad-tool";
version = "1.2";
src = fetchurl {
url = "https://generalarcade.com/gamepadtool/linux/gamepadtool_${finalAttrs.version}_amd64.deb";
hash = "sha256-ZuB0TOyT2B5QkU1o5h3/8PL85tBq06hlz5YclRanD88=";
};
nativeBuildInputs = [
dpkg
qt5.wrapQtAppsHook
autoPatchelfHook
];
dontBuild = true;
buildInputs = [
SDL2
qt5.qtbase
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share/applications
cp usr/bin/gamepad-tool $out/bin
cp -r usr/share/icons $out/share/icons
substitute usr/share/applications/gamepad-tool-debian.desktop \
$out/share/applications/gamepad-tool.desktop \
--replace-fail "/usr/share/icons/hicolor/256x256/apps/gamepad-tool.png" "gamepad-tool"
runHook postInstall
'';
meta = {
description = "Simple GUI tool to create/modify gamepad mappings for games that use SDL2 Game Controller API";
homepage = "https://generalarcade.com/gamepadtool/";
license = lib.licenses.unfree;
platforms = [ "x86_64-linux" ];
maintainers = with lib.maintainers; [ gador ];
mainProgram = "gamepad-tool";
};
})