This repository has no description
914 B
36 lines
1{
2 perSystem =
3 { pkgs, ... }:
4 let
5 python = pkgs.python3.withPackages (ps: [ ps.evdev ]);
6 in
7 {
8 packages.turbomode = pkgs.stdenv.mkDerivation {
9 pname = "turbomode";
10 version = "0.1.0";
11
12 src = ./.;
13
14 nativeBuildInputs = [ pkgs.makeWrapper ];
15
16 installPhase = ''
17 runHook preInstall
18 mkdir -p $out/bin
19 cp turbomode.py $out/bin/turbomode
20 chmod +x $out/bin/turbomode
21 wrapProgram $out/bin/turbomode \
22 --prefix PATH : ${python}/bin \
23 --set PYTHONPATH ${python}/${python.sitePackages}
24 runHook postInstall
25 '';
26
27 passthru.usage = builtins.readFile ./usage.kdl;
28
29 meta = {
30 description = "Turbo/rapid-fire mode for gamepad buttons";
31 platforms = pkgs.lib.platforms.linux;
32 mainProgram = "turbomode";
33 };
34 };
35 };
36}