nixpkgs-suyu/pkgs/misc/rivalcfg/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
1.1 KiB
Nix
Raw Normal View History

2021-10-25 05:13:45 +02:00
{ lib, fetchFromGitHub, python3Packages }:
python3Packages.buildPythonPackage rec {
pname = "rivalcfg";
2024-03-05 09:19:41 +01:00
version = "4.12.0";
2021-10-25 05:13:45 +02:00
src = fetchFromGitHub {
owner = "flozz";
repo = "rivalcfg";
2024-01-12 03:48:18 +01:00
rev = "refs/tags/v${version}";
2024-03-05 09:19:41 +01:00
sha256 = "sha256-fkZvEaJJIfzyVyXhlb7Jlv5dASNKyclDIlyXU0uu5wo=";
2021-10-25 05:13:45 +02:00
};
propagatedBuildInputs = with python3Packages; [ hidapi setuptools ];
checkInputs = [ python3Packages.pytest ];
checkPhase = "pytest";
# tests are broken
doCheck = false;
postInstall = ''
set -x
mkdir -p $out/lib/udev/rules.d
2023-04-23 22:08:31 +02:00
tmpl_udev="$out/lib/udev/rules.d/99-rivalcfg.rules"
tmpudev="''${tmpl_udev}.in"
finaludev="$tmpl_udev"
"$out/bin/rivalcfg" --print-udev > "$tmpudev"
substitute "$tmpudev" "$out/lib/udev/rules.d/99-rivalcfg.rules" \
--replace MODE=\"0666\" "MODE=\"0664\", GROUP=\"input\""
rm "$tmpudev"
2021-10-25 05:13:45 +02:00
'';
meta = with lib; {
description = "Utility program that allows you to configure SteelSeries Rival gaming mice";
homepage = "https://github.com/flozz/rivalcfg";
2023-04-23 22:08:31 +02:00
license = licenses.wtfpl;
2021-10-25 05:13:45 +02:00
maintainers = with maintainers; [ ornxka ];
2023-11-23 22:09:35 +01:00
mainProgram = "rivalcfg";
2021-10-25 05:13:45 +02:00
};
}