Files
nixpkgs/pkgs/by-name/gi/gimx/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

77 lines
1.5 KiB
Nix

{
stdenv,
lib,
fetchFromGitHub,
makeWrapper,
curl,
libusb1,
bluez,
libxml2,
ncurses5,
libmhash,
xorg,
}:
let
gimx-config = fetchFromGitHub {
owner = "matlo";
repo = "GIMX-configurations";
rev = "c20300f24d32651d369e2b27614b62f4b856e4a0";
hash = "sha256-t/Ttlvc9LCRW624oSsFaP8EmswJ3OAn86QgF1dCUjAs=";
};
in
stdenv.mkDerivation rec {
pname = "gimx";
version = "8.0";
src = fetchFromGitHub {
owner = "matlo";
repo = "GIMX";
tag = "v${version}";
fetchSubmodules = true;
hash = "sha256-BcFLdQgEAi6Sxyb5/P9YAIkmeXNZXrKcOa/6g817xQg=";
};
env.NIX_CFLAGS_COMPILE = "-Wno-error";
patches = [ ./conf.patch ];
makeFlags = [ "build-core" ];
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
curl
libusb1
bluez
libxml2
ncurses5
libmhash
xorg.libX11
xorg.libXi
];
installPhase = ''
runHook preInstall
mkdir -p $out
substituteInPlace ./core/Makefile --replace-fail "chmod ug+s" "echo"
export DESTDIR="$out"
make install-shared install-core
mv $out/usr/lib $out/lib
mv $out/usr/bin $out/bin
cp -r ${gimx-config}/Linux $out/share
makeWrapper $out/bin/gimx $out/bin/gimx-ds4 \
--add-flags "--nograb" --add-flags "-p /dev/ttyUSB0" \
--add-flags "-c $out/share/Dualshock4.xml"
runHook postInstall
'';
meta = {
homepage = "https://github.com/matlo/GIMX";
description = "Game Input Multiplexer";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.linux;
};
}