mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-02 11:03:57 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
35 lines
921 B
Nix
35 lines
921 B
Nix
{ lib, fetchFromGitHub, python3Packages, libusb1, linuxHeaders
|
|
}:
|
|
|
|
with python3Packages;
|
|
|
|
buildPythonApplication {
|
|
pname = "steamcontroller";
|
|
version = "2017-08-11";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ynsta";
|
|
repo = "steamcontroller";
|
|
rev = "80928ce237925e0d0d7a65a45b481435ba6b931e";
|
|
sha256 = "0lv9j2zv8fmkmc0x9r7fa8zac2xrwfczms35qz1nfa1hr84wniid";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace src/uinput.py --replace \
|
|
"/usr/include" "${linuxHeaders}/include"
|
|
'';
|
|
|
|
buildInputs = [ libusb1 ];
|
|
propagatedBuildInputs = [ psutil python3Packages.libusb1 ];
|
|
doCheck = false;
|
|
pythonImportsCheck = [ "steamcontroller" ];
|
|
|
|
meta = with lib; {
|
|
description = "Standalone Steam controller driver";
|
|
homepage = "https://github.com/ynsta/steamcontroller";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ rnhmjoj ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|