nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 autoreconfHook,
6 libusb1,
7 nix-update-script,
8}:
9stdenv.mkDerivation (finalAttrs: {
10 pname = "dfu-programmer";
11 version = "1.1.0";
12
13 src = fetchFromGitHub {
14 owner = "dfu-programmer";
15 repo = "dfu-programmer";
16 rev = "v${finalAttrs.version}";
17 hash = "sha256-YhiBD8rpzEVVaP3Rdfq74lhZ0Mu7OEbrMsM3fBL1Kvk";
18 };
19
20 buildInputs = [
21 libusb1
22 ];
23
24 nativeBuildInputs = [
25 autoreconfHook
26 ];
27
28 # No build configured in source, automake requires ChangeLog to exist
29 preAutoreconf = ''
30 touch ChangeLog
31 '';
32
33 postPatch = ''
34 patchShebangs --build bootstrap.sh
35 patchShebangs --build update-bash-completion.sh
36 '';
37
38 passthru.updateScript = nix-update-script { };
39
40 meta = {
41 license = lib.licenses.gpl2;
42 description = "Device Firmware Update based USB programmer for Atmel chips with a USB bootloader";
43 mainProgram = "dfu-programmer";
44 homepage = "https://github.com/dfu-programmer/dfu-programmer";
45 maintainers = with lib.maintainers; [
46 mbinns
47 cybardev
48 ];
49 platforms = lib.platforms.unix;
50 };
51})