uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
60
pkgs/misc/drivers/sc-controller/default.nix
Normal file
60
pkgs/misc/drivers/sc-controller/default.nix
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
{ lib, buildPythonApplication, fetchFromGitHub, wrapGAppsHook
|
||||
, pytestCheckHook
|
||||
, gtk3, gobject-introspection, libappindicator-gtk3, librsvg
|
||||
, evdev, pygobject3, pylibacl, bluez, vdf
|
||||
, linuxHeaders
|
||||
, libX11, libXext, libXfixes, libusb1, udev
|
||||
}:
|
||||
|
||||
buildPythonApplication rec {
|
||||
pname = "sc-controller";
|
||||
version = "0.4.8.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Ryochan7";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "03514sb1spaxdr7x1gq7b54z74in4kd060adj6sq1xjj6d9b297i";
|
||||
};
|
||||
|
||||
# see https://github.com/NixOS/nixpkgs/issues/56943
|
||||
strictDeps = false;
|
||||
|
||||
nativeBuildInputs = [ wrapGAppsHook ];
|
||||
|
||||
buildInputs = [ gtk3 gobject-introspection libappindicator-gtk3 librsvg ];
|
||||
|
||||
propagatedBuildInputs = [ evdev pygobject3 pylibacl vdf ];
|
||||
|
||||
checkInputs = [ pytestCheckHook ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace scc/paths.py --replace sys.prefix "'$out'"
|
||||
substituteInPlace scc/uinput.py --replace /usr/include ${linuxHeaders}/include
|
||||
substituteInPlace scc/device_monitor.py --replace "find_library('bluetooth')" "'libbluetooth.so.3'"
|
||||
'';
|
||||
|
||||
LD_LIBRARY_PATH = lib.makeLibraryPath [ libX11 libXext libXfixes libusb1 udev bluez ];
|
||||
|
||||
preFixup = ''
|
||||
gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : "$LD_LIBRARY_PATH")
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
(
|
||||
# scc runs these scripts as programs. (See find_binary() in scc/tools.py.)
|
||||
cd $out/lib/python*/site-packages/scc/x11
|
||||
patchPythonScript scc-autoswitch-daemon.py
|
||||
patchPythonScript scc-osd-daemon.py
|
||||
)
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/Ryochan7/sc-controller";
|
||||
# donations: https://www.patreon.com/kozec
|
||||
description = "User-mode driver and GUI for Steam Controller and other controllers";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ orivej rnhmjoj ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue