17 stdenv.mkDerivation (finalAttrs: {
18 pname = "trigger-control";
21 src = fetchFromGitHub {
22 owner = "Etaash-mathamsetty";
23 repo = "trigger-control";
24 # upstream does not use consistant tags pattern, so we use git commit hash
25 # https://github.com/Etaash-mathamsetty/trigger-control/tags
26 rev = "7b46e743227830d3a97720067d0a6cf20133af90";
27 hash = "sha256-nWSvsgksZ4Cxy1+i0xy8pNalgsiAuaqxNVwT/CThaBI=";
42 ++ lib.optionals stdenv.hostPlatform.isLinux [
47 # Fix build on clang https://github.com/Etaash-mathamsetty/trigger-control/pull/23
50 url = "https://github.com/Etaash-mathamsetty/trigger-control/commit/bbec33296fdac7e2ca0398ae19ca8de8ad883407.patch";
51 hash = "sha256-x6RymdzBlzAJ8O8QGqXQtvkZkjdTaC5X8syFPunqZik=";
55 # The app crashes without a changed fontdir and upstream recommends dejavu as font
57 substituteInPlace trigger-control.cpp --replace "/usr/share/fonts/" "${dejavu_fonts}/share/fonts/"
63 install -D trigger-control $out/bin/trigger-control
68 postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
69 wrapProgram $out/bin/trigger-control \
70 --prefix PATH : ${lib.makeBinPath [ zenity ]}
74 description = "Control the dualsense's triggers on Linux (and Windows) with a gui and C++ api";
75 homepage = "https://github.com/Etaash-mathamsetty/trigger-control";
76 license = licenses.mit;
77 mainProgram = "trigger-control";
78 maintainers = with maintainers; [ azuwis ];
79 platforms = platforms.all;