Skip to content

Commit

Permalink
trigger-control: unstable-2023-06-18 -> 1.5.1
Browse files Browse the repository at this point in the history
Also fix build on darwin/clang
  • Loading branch information
azuwis committed Nov 30, 2023
1 parent 3f21a22 commit be94fe0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, makeWrapper
, pkg-config
Expand All @@ -16,15 +17,17 @@ let
inherit (gnome) zenity;
in

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "trigger-control";
version = "unstable-2023-06-18";
version = "1.5.1";

src = fetchFromGitHub {
owner = "Etaash-mathamsetty";
repo = "trigger-control";
rev = "d457ebd9e0844cfc456bfa4fa4bb694bb8ad982a";
hash = "sha256-QWhUQ8xqS8oRVF0KUpEthlrOoXmhcfEkIHauDI1/5a8=";
# upstream does not use consistant tags pattern, so we use git commit hash
# https://github.com/Etaash-mathamsetty/trigger-control/tags
rev = "7b46e743227830d3a97720067d0a6cf20133af90";
hash = "sha256-nWSvsgksZ4Cxy1+i0xy8pNalgsiAuaqxNVwT/CThaBI=";
};

nativeBuildInputs = [
Expand All @@ -41,6 +44,15 @@ stdenv.mkDerivation rec {
libdecor
];

patches = [
# Fix build on clang https://github.com/Etaash-mathamsetty/trigger-control/pull/23
(fetchpatch {
name = "clang.patch";
url = "https://github.com/Etaash-mathamsetty/trigger-control/commit/bbec33296fdac7e2ca0398ae19ca8de8ad883407.patch";
hash = "sha256-x6RymdzBlzAJ8O8QGqXQtvkZkjdTaC5X8syFPunqZik=";
})
];

# 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/"
Expand All @@ -63,7 +75,8 @@ stdenv.mkDerivation rec {
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;
mainProgram = "trigger-control";
maintainers = with maintainers; [ azuwis ];
platforms = platforms.all;
};
}
})
2 changes: 0 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2087,8 +2087,6 @@ with pkgs;

transmission-rss = callPackage ../tools/networking/transmission-rss { };

trigger-control = callPackage ../tools/games/trigger-control { };

trimage = callPackage ../applications/graphics/trimage { inherit (qt5) wrapQtAppsHook; };

ttchat = callPackage ../tools/misc/ttchat { };
Expand Down

0 comments on commit be94fe0

Please sign in to comment.