dfu-programmer: 0.7.2 -> 1.1.0

Fixes migration to GCC 15 and the gnu23 reserved words errors
https://github.com/NixOS/nixpkgs/issues/475479
This commit is contained in:
mackb
2026-01-03 16:28:21 -08:00
parent 0a1589e5cf
commit 2772a883a9
+35 -13
View File
@@ -1,29 +1,51 @@
{
lib,
stdenv,
fetchurl,
libusb-compat-0_1,
fetchFromGitHub,
autoreconfHook,
libusb1,
nix-update-script,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "dfu-programmer";
version = "0.7.2";
version = "1.1.0";
buildInputs = [ libusb-compat-0_1 ];
src = fetchurl {
url = "mirror://sourceforge/dfu-programmer/${pname}-${version}.tar.gz";
sha256 = "15gr99y1z9vbvhrkd25zqhnzhg6zjmaam3vfjzf2mazd39mx7d0x";
src = fetchFromGitHub {
owner = "dfu-programmer";
repo = "dfu-programmer";
rev = "v${finalAttrs.version}";
hash = "sha256-YhiBD8rpzEVVaP3Rdfq74lhZ0Mu7OEbrMsM3fBL1Kvk";
};
configureFlags = [ "--disable-libusb_1_0" ];
buildInputs = [
libusb1
];
env.NIX_CFLAGS_COMPILE = "-std=gnu17";
nativeBuildInputs = [
autoreconfHook
];
# No build configured in source, automake requires ChangeLog to exist
preAutoreconf = ''
touch ChangeLog
'';
postPatch = ''
patchShebangs --build bootstrap.sh
patchShebangs --build update-bash-completion.sh
'';
passthru.updateScript = nix-update-script { };
meta = {
license = lib.licenses.gpl2;
description = "Device Firmware Update based USB programmer for Atmel chips with a USB bootloader";
mainProgram = "dfu-programmer";
homepage = "http://dfu-programmer.sourceforge.net/";
homepage = "https://github.com/dfu-programmer/dfu-programmer";
maintainers = with lib.maintainers; [
mbinns
cybardev
];
platforms = lib.platforms.unix;
};
}
})