mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
eb04659fc2
This was achieved using the following command: sd 'wrapGAppsHook\b' wrapGAppsHook3 (rg -l 'wrapGAppsHook\b') And then manually reverted the following changes: - alias in top-level.nix - function name in wrap-gapps-hook.sh - comment in postFixup of at-spi2-core - comment in gtk4 - comment in preFixup of 1password-gui/linux.nix - comment in postFixup of qgis/unwrapped-ltr.nix and qgis/unwrapped.nix - comment in postFixup of telegram-desktop - comment in postFixup of fwupd - buildCommand of mongodb-compass - postFixup of xflux-gui - comment in a patch in kdePackages.kde-gtk-config and plasma5Packages.kde-gtk-config - description of programs.sway.wrapperFeatures.gtk NixOS option (manual rebuild)
58 lines
1.8 KiB
Nix
58 lines
1.8 KiB
Nix
{ lib, buildPythonApplication, fetchFromGitHub, wrapGAppsHook3
|
|
, 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.13";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Ryochan7";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
sha256 = "sha256-vK/5S+GyqVfKTqn5PaPmOV/tXE9PIW57gqYxvhGaJSg=";
|
|
};
|
|
|
|
nativeBuildInputs = [ wrapGAppsHook3 gobject-introspection ];
|
|
|
|
buildInputs = [ gtk3 libappindicator-gtk3 librsvg ];
|
|
|
|
propagatedBuildInputs = [ evdev pygobject3 pylibacl vdf ];
|
|
|
|
nativeCheckInputs = [ 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 ];
|
|
};
|
|
}
|