flashprog: Apply patch for fixing compiler warnings

Quoting the original commit message:

Some toolchains complain that this shadows the global from <getopt.h>.
Alas,  toolchains seem inconsistent in the decision when to warn about
shadowing of globals from system headers and when not to.  Hence, just
rename `optarg' -> `opt_arg'.

Fixes compiler warnings on Darwin and enables building.

Signed-off-by: Felix Singer <felixsinger@posteo.net>
This commit is contained in:
Felix Singer
2025-02-19 20:40:46 +01:00
committed by Bjørn Forsman
parent 43fccee556
commit 7a9e4a3a3d
+10
View File
@@ -1,5 +1,6 @@
{
fetchgit,
fetchpatch,
lib,
libftdi1,
libgpiod,
@@ -24,6 +25,15 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-S+UKDtpKYenwm+zR+Bg8HHxb2Jr7mFHAVCZdZTqCyRQ=";
};
patches = [
# fixes compiler warnings on Darwin
(fetchpatch {
url = "https://review.sourcearcade.org/changes/flashprog~309/revisions/2/patch?download";
hash = "sha256-eiEenR8+CHCJcNx9YY09I7gxRGUQWmaQlmXtykvXyMU=";
decode = "base64 -d";
})
];
nativeBuildInputs = [
meson
ninja