From 8f31f1add50b4f107f4dc69f12c0aa3c3d5cf49d Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Fri, 13 Aug 2021 12:10:50 +0200 Subject: [PATCH] gust_tools: use patch from upstream --- ...compiler-error-about-different-signs.patch | 34 ------------------- gust_tools/default.nix | 7 ++-- 2 files changed, 5 insertions(+), 36 deletions(-) delete mode 100644 gust_tools/0001-gust_ebm-fix-compiler-error-about-different-signs.patch diff --git a/gust_tools/0001-gust_ebm-fix-compiler-error-about-different-signs.patch b/gust_tools/0001-gust_ebm-fix-compiler-error-about-different-signs.patch deleted file mode 100644 index dd033e5..0000000 --- a/gust_tools/0001-gust_ebm-fix-compiler-error-about-different-signs.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 08a150625260fb684ec33f2a1d1489e2e277903a Mon Sep 17 00:00:00 2001 -From: Simon Bruder -Date: Wed, 11 Aug 2021 23:44:07 +0200 -Subject: [PATCH] gust_ebm: fix compiler error about different signs -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -GCC 10 currently fails with this error: - -gust_ebm.c: In function ‘main_utf8’: -gust_ebm.c:85:49: error: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Werror=sign-compare] - 85 | if (json_array_get_count(json_messages) != abs(nb_messages)) { - | ^~ ---- - gust_ebm.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gust_ebm.c b/gust_ebm.c -index 35ca4f2..7a4cf51 100644 ---- a/gust_ebm.c -+++ b/gust_ebm.c -@@ -82,7 +82,7 @@ int main_utf8(int argc, char** argv) - goto out; - } - JSON_Array* json_messages = json_object_get_array(json_object(json), "messages"); -- if (json_array_get_count(json_messages) != abs(nb_messages)) { -+ if (json_array_get_count(json_messages) != (unsigned int)abs(nb_messages)) { - fprintf(stderr, "ERROR: Number of messages doesn't match the array size\n"); - goto out; - } --- -2.31.1 - diff --git a/gust_tools/default.nix b/gust_tools/default.nix index 567dcd1..3f0ff12 100644 --- a/gust_tools/default.nix +++ b/gust_tools/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub }: +{ lib, stdenv, fetchFromGitHub, fetchpatch }: stdenv.mkDerivation rec { pname = "gust_tools"; @@ -12,7 +12,10 @@ stdenv.mkDerivation rec { }; patches = [ - ./0001-gust_ebm-fix-compiler-error-about-different-signs.patch + (fetchpatch { + url = "https://github.com/VitaSmith/gust_tools/commit/b564b54b1825e15bc743450605d8dae0a7366d1e.patch"; + sha256 = "sha256-geTqFT89U2JRJwKduqkRbO0DlOvKxqqquvVVVIu2IB8="; + }) ]; installPhase = ''