gimx: fix build

This commit is contained in:
bb2020 2021-11-24 20:57:47 +03:00
parent 906b1bbe58
commit fd8414512b

View file

@ -1,5 +1,5 @@
{ stdenv, lib, fetchFromGitHub, makeWrapper, curl, libusb1, xorg, libxml2
, ncurses5, bluez, libmhash, gimxPDP ? false }:
, ncurses5, bluez, libmhash, gimxPdpGamepad ? false }:
let
gimx-config = fetchFromGitHub {
@ -11,14 +11,14 @@ let
in stdenv.mkDerivation rec {
pname = "gimx";
version = "8.0";
version = "unstable-2021-08-31";
src = fetchFromGitHub {
owner = "matlo";
repo = "GIMX";
rev = "v${version}";
rev = "58d2098dce75ed4c90ae649460d3a7a150f4ef0a";
fetchSubmodules = true;
sha256 = "0265gg6q7ymg76fb4pjrfdwjd280b3zzry96qy92w0h411slph85";
sha256 = "05kdv2qqr311c2p76hdlgvrq7b04vcpps5c80zn8b8l7p831ilgz";
};
patches = [ ./conf.patch ];
@ -28,7 +28,7 @@ in stdenv.mkDerivation rec {
xorg.libX11 xorg.libXi xorg.libXext
];
postPatch = lib.optionals gimxPDP ''
postPatch = lib.optionals gimxPdpGamepad ''
substituteInPlace ./shared/gimxcontroller/include/x360.h \
--replace "0x045e" "0x0e6f" --replace "0x028e" "0x0213"
substituteInPlace ./loader/firmware/EMU360.hex \
@ -60,10 +60,6 @@ in stdenv.mkDerivation rec {
cp -r ${./custom} $out/share/custom
makeWrapper $out/bin/gimx $out/bin/gimx-dualshock4 \
--set GIMXCONF 1 --add-flags "--nograb" --add-flags "-p /dev/ttyUSB0" \
--add-flags "-c $out/share/config/Dualshock4.xml"
makeWrapper $out/bin/gimx $out/bin/gimx-dualshock4-noff \
--set GIMXCONF 1 --add-flags "--nograb" --add-flags "-p /dev/ttyUSB0" \
--add-flags "-c $out/share/custom/Dualshock4.xml"