mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-17 10:40:33 +03:00
trigger-control: init at unstable-2023-06-18
homepage: https://github.com/Etaash-mathamsetty/trigger-control description: Control the dualsense's triggers on Linux (and Windows) with a gui and C++ api
This commit is contained in:
parent
6b866a5e5f
commit
a075eb3ba9
68
pkgs/tools/games/trigger-control/default.nix
Normal file
68
pkgs/tools/games/trigger-control/default.nix
Normal file
@ -0,0 +1,68 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, makeWrapper
|
||||
, pkg-config
|
||||
, SDL2
|
||||
, dbus
|
||||
, libdecor
|
||||
, libnotify
|
||||
, dejavu_fonts
|
||||
, gnome
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (gnome) zenity;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "trigger-control";
|
||||
version = "unstable-2023-06-18";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Etaash-mathamsetty";
|
||||
repo = "trigger-control";
|
||||
rev = "d457ebd9e0844cfc456bfa4fa4bb694bb8ad982a";
|
||||
hash = "sha256-QWhUQ8xqS8oRVF0KUpEthlrOoXmhcfEkIHauDI1/5a8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
makeWrapper
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
SDL2
|
||||
dbus
|
||||
libnotify
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
libdecor
|
||||
];
|
||||
|
||||
# The app crashes without a changed fontdir and upstream recommends dejavu as font
|
||||
postPatch = ''
|
||||
substituteInPlace trigger-control.cpp --replace "/usr/share/fonts/" "${dejavu_fonts}/share/fonts/"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -D trigger-control $out/bin/trigger-control
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postInstall = lib.optionalString stdenv.isLinux ''
|
||||
wrapProgram $out/bin/trigger-control \
|
||||
--prefix PATH : ${lib.makeBinPath [ zenity ]}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Control the dualsense's triggers on Linux (and Windows) with a gui and C++ api";
|
||||
homepage = "https://github.com/Etaash-mathamsetty/trigger-control";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ azuwis ];
|
||||
};
|
||||
}
|
@ -1797,6 +1797,8 @@ with pkgs;
|
||||
|
||||
topicctl = callPackage ../tools/misc/topicctl { };
|
||||
|
||||
trigger-control = callPackage ../tools/games/trigger-control { };
|
||||
|
||||
ttchat = callPackage ../tools/misc/ttchat { };
|
||||
|
||||
ukmm = callPackage ../tools/games/ukmm { };
|
||||
|
Loading…
Reference in New Issue
Block a user