From 7a875d8aa53f8dbe7907a2b8a040822617e2a0ff Mon Sep 17 00:00:00 2001 From: bb2020 Date: Wed, 7 May 2025 15:00:15 +0300 Subject: [PATCH] gimx: fix build --- pkgs/by-name/gi/gimx/conf.patch | 37 ++++++++++++++++++++++++++------ pkgs/by-name/gi/gimx/gcc14.patch | 26 ---------------------- pkgs/by-name/gi/gimx/package.nix | 13 +++++------ 3 files changed, 36 insertions(+), 40 deletions(-) delete mode 100644 pkgs/by-name/gi/gimx/gcc14.patch diff --git a/pkgs/by-name/gi/gimx/conf.patch b/pkgs/by-name/gi/gimx/conf.patch index 1040a6192f38..c690a33805e3 100644 --- a/pkgs/by-name/gi/gimx/conf.patch +++ b/pkgs/by-name/gi/gimx/conf.patch @@ -1,8 +1,15 @@ -diff --git a/core/config_reader.c b/core/config_reader.c -index 451fc48..ed45f4d 100644 --- a/core/config_reader.c +++ b/core/config_reader.c -@@ -1355,7 +1355,7 @@ int read_config_file(const char* file) +@@ -17,7 +17,7 @@ + #include "../directories.h" + #include "macros.h" + #include +- ++#include + /* + * These variables are used to read the configuration. + */ +@@ -1355,7 +1355,7 @@ char file_path[PATH_MAX]; snprintf(file_path, sizeof(file_path), "%s%s%s%s", gimx_params.homedir, GIMX_DIR, CONFIG_DIR, file); @@ -11,11 +18,18 @@ index 451fc48..ed45f4d 100644 if(read_file(file_path) == -1) { gerror("read_file failed\n"); -diff --git a/core/gimx.c b/core/gimx.c -index 700cae9..9143d8b 100755 --- a/core/gimx.c +++ b/core/gimx.c -@@ -192,7 +192,7 @@ void show_config() +@@ -8,7 +8,7 @@ + #include //to print errors + #include //to print errors + #include //PATH_MAX +- ++#include + #ifndef WIN32 + #include //to disable/enable echo + #include +@@ -192,7 +192,7 @@ char file_path[PATH_MAX]; snprintf(file_path, sizeof(file_path), "%s%s%s%s", gimx_params.homedir, GIMX_DIR, CONFIG_DIR, gimx_params.config_file); @@ -24,3 +38,14 @@ index 700cae9..9143d8b 100755 FILE * fp = gfile_fopen(file_path, "r"); if (fp == NULL) { +--- a/core/connectors/bluetooth/linux/bt_mgmt.c ++++ b/core/connectors/bluetooth/linux/bt_mgmt.c +@@ -322,7 +322,7 @@ static int read_link_keys(uint16_t index, uint16_t nb_keys, bdaddr_t bdaddrs[nb_ + bdaddr_t ba; + char dongle_bdaddr[18]; + +- if(bt_device_abs_get(bt_abs_value)->get_bdaddr(index, &ba) < 0) ++ if(bt_device_abs_get()->get_bdaddr(index, &ba) < 0) + { + fprintf(stderr, "can't read device bdaddr\n"); + return -1; diff --git a/pkgs/by-name/gi/gimx/gcc14.patch b/pkgs/by-name/gi/gimx/gcc14.patch deleted file mode 100644 index b736891f07ea..000000000000 --- a/pkgs/by-name/gi/gimx/gcc14.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/core/config_reader.c b/core/config_reader.c -index 451fc48..737d27c 100644 ---- a/core/config_reader.c -+++ b/core/config_reader.c -@@ -17,7 +17,7 @@ - #include "../directories.h" - #include "macros.h" - #include -- -+#include - /* - * These variables are used to read the configuration. - */ -diff --git a/core/gimx.c b/core/gimx.c -index 700cae9..693f72f 100755 ---- a/core/gimx.c -+++ b/core/gimx.c -@@ -8,7 +8,7 @@ - #include //to print errors - #include //to print errors - #include //PATH_MAX -- -+#include - #ifndef WIN32 - #include //to disable/enable echo - #include diff --git a/pkgs/by-name/gi/gimx/package.nix b/pkgs/by-name/gi/gimx/package.nix index b2e1372fc35f..ed6a382e0298 100644 --- a/pkgs/by-name/gi/gimx/package.nix +++ b/pkgs/by-name/gi/gimx/package.nix @@ -34,10 +34,8 @@ stdenv.mkDerivation rec { }; env.NIX_CFLAGS_COMPILE = "-Wno-error"; - patches = [ - ./conf.patch - ./gcc14.patch - ]; + patches = [ ./conf.patch ]; + makeFlags = [ "build-core" ]; nativeBuildInputs = [ makeWrapper ]; buildInputs = [ @@ -50,7 +48,6 @@ stdenv.mkDerivation rec { xorg.libX11 xorg.libXi ]; - makeFlags = [ "build-core" ]; installPhase = '' runHook preInstall @@ -70,10 +67,10 @@ stdenv.mkDerivation rec { runHook postInstall ''; - meta = with lib; { + meta = { homepage = "https://github.com/matlo/GIMX"; description = "Game Input Multiplexer"; - license = licenses.gpl3Only; - platforms = platforms.linux; + license = lib.licenses.gpl3Only; + platforms = lib.platforms.linux; }; }