This reverts commit 65a333600d5c88a98d674f637d092807cfc12253. This wasn't tested for correctness with something like fodwatch [0], and should not have been (self-)merged so quickly, especially without further review. It also resulted in the breakage of at least one package [1] (and that's the one we know of and was caught). A few packages that were updated in between this commit and this revert were not reverted back to using `rev`, but other than that, this is a 1:1 revert. [0]: https://codeberg.org/raphaelr/fodwatch [1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e4587d75882aebc21a04bee960418f8ce9
45 lines
808 B
Nix
45 lines
808 B
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
buildPythonPackage,
|
|
evdev,
|
|
pyudev,
|
|
bluez,
|
|
setuptools,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "ds4drv";
|
|
version = "0.5.1";
|
|
|
|
pyproject = true;
|
|
build-system = [ setuptools ];
|
|
|
|
# PyPi only carries py3 wheel
|
|
src = fetchFromGitHub {
|
|
owner = "chrippa";
|
|
repo = "ds4drv";
|
|
rev = "v${version}";
|
|
sha256 = "0vinpla0apizzykcyfis79mrm1i6fhns83nkzw85svypdhkx2g8v";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace ds4drv/config.py \
|
|
--replace-fail SafeConfigParser ConfigParser
|
|
'';
|
|
|
|
dependencies = [
|
|
evdev
|
|
pyudev
|
|
];
|
|
|
|
buildInputs = [ bluez ];
|
|
|
|
meta = {
|
|
description = "Userspace driver for the DualShock 4 controller";
|
|
mainProgram = "ds4drv";
|
|
homepage = "https://github.com/chrippa/ds4drv";
|
|
license = lib.licenses.mit;
|
|
};
|
|
}
|