From 7a9e4a3a3d3e7d8686df9fbb80f805989b48fb8b Mon Sep 17 00:00:00 2001 From: Felix Singer Date: Tue, 18 Feb 2025 03:25:05 +0100 Subject: [PATCH] flashprog: Apply patch for fixing compiler warnings Quoting the original commit message: Some toolchains complain that this shadows the global from . 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 --- pkgs/by-name/fl/flashprog/package.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/by-name/fl/flashprog/package.nix b/pkgs/by-name/fl/flashprog/package.nix index d3063aa97ff0..67c5805073a2 100644 --- a/pkgs/by-name/fl/flashprog/package.nix +++ b/pkgs/by-name/fl/flashprog/package.nix @@ -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