From 808589cf9da1697e53dffe3a0855cd1c0d1acac4 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Wed, 11 Aug 2021 23:56:43 +0200 Subject: [PATCH] gust_tools: init at 1.37 --- default.nix | 2 ++ flake.nix | 1 + ...compiler-error-about-different-signs.patch | 34 +++++++++++++++++++ gust_tools/default.nix | 32 +++++++++++++++++ 4 files changed, 69 insertions(+) create mode 100644 gust_tools/0001-gust_ebm-fix-compiler-error-about-different-signs.patch create mode 100644 gust_tools/default.nix diff --git a/default.nix b/default.nix index b4fa1f0..a221d3d 100644 --- a/default.nix +++ b/default.nix @@ -25,6 +25,8 @@ in face_morpher = callPythonPackage ./face_morpher { }; + gust_tools = callPackage ./gust_tools { }; + mpvScripts = prev.mpvScripts // { pitchcontrol = callPackage ./mpv-scripts/pitchcontrol { }; }; diff --git a/flake.nix b/flake.nix index 7b0cedd..0057eb8 100644 --- a/flake.nix +++ b/flake.nix @@ -39,6 +39,7 @@ deemix fSpy face_morpher + gust_tools nsz oha playgsf 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 new file mode 100644 index 0000000..dd033e5 --- /dev/null +++ b/gust_tools/0001-gust_ebm-fix-compiler-error-about-different-signs.patch @@ -0,0 +1,34 @@ +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 new file mode 100644 index 0000000..567dcd1 --- /dev/null +++ b/gust_tools/default.nix @@ -0,0 +1,32 @@ +{ lib, stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + pname = "gust_tools"; + version = "1.37"; + + src = fetchFromGitHub { + owner = "VitaSmith"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-/Uq+NaAAKbiEAxFnB0UJkhdsGKa6uQBnH9AmAlpi30s="; + }; + + patches = [ + ./0001-gust_ebm-fix-compiler-error-about-different-signs.patch + ]; + + installPhase = '' + runHook preInstall + mkdir -p $out/bin + cp gust_{ebm,elixir,enc,g1t,pak} $out/bin/ + runHook postInstall + ''; + + meta = with lib; { + description = "A set of utilities for dealing with Gust (Koei Tecmo) PC games files"; + homepage = "https://github.com/VitaSmith/gust_tools"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ sbruder ]; + platforms = platforms.unix; + }; +}