diff --git a/pkgs/tools/text/yx/0001-Don-t-strip-binary-when-installing.patch b/pkgs/tools/text/yx/0001-Don-t-strip-binary-when-installing.patch new file mode 100644 index 000000000000..e18d52af0be6 --- /dev/null +++ b/pkgs/tools/text/yx/0001-Don-t-strip-binary-when-installing.patch @@ -0,0 +1,26 @@ +From b90b2c5989e9ddd3cfc79f56cb8a9194561bd4d7 Mon Sep 17 00:00:00 2001 +From: Tom Wieczorek +Date: Fri, 26 Jul 2024 11:08:45 +0200 +Subject: [PATCH] Don't strip binary when installing + +Doesn't play well with cross-compiling. +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 724c962..284cab3 100644 +--- a/Makefile ++++ b/Makefile +@@ -12,7 +12,7 @@ test: yx + (cd tests && ./do_tests.sh) + + install: yx +- install -sDm0755 -t "$(PREFIX)"/bin yx ++ install -Dm0755 -t "$(PREFIX)"/bin yx + install -Dm0644 -t "$(PREFIX)"/share/man/man1 yx.1 + + clean: +-- +2.42.2 + diff --git a/pkgs/tools/text/yx/default.nix b/pkgs/tools/text/yx/default.nix index 732be1760c9e..f773ca66a000 100644 --- a/pkgs/tools/text/yx/default.nix +++ b/pkgs/tools/text/yx/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitLab +, fetchpatch , libyaml , testers , yx @@ -16,6 +17,16 @@ stdenv.mkDerivation rec { hash = "sha256-uuso+hsmdsB7VpIRKob8rfMaWvRMCBHvCFnYrHPC6iw="; }; + patches = [ + # https://gitlab.com/tomalok/yx/-/issues/2 + ./0001-Don-t-strip-binary-when-installing.patch + (fetchpatch { + # https://gitlab.com/tomalok/yx/-/merge_requests/10 + url = "https://gitlab.com/tomalok/yx/-/commit/5747ca40f4b0acb56d67fd29a818734d7b19d61a.patch"; + hash = "sha256-0tNtkq1tZ96Ag5EJfUfDao/QxpRB4Jadop3OPBvhnlo="; + }) + ]; + makeFlags = [ "PREFIX=${placeholder "out"}" ];