nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 fetchurl,
3 lib,
4 libusb-compat-0_1,
5 stdenv,
6}:
7
8stdenv.mkDerivation {
9 pname = "bootloadhid";
10 version = "0-unstable-2012-12-08";
11
12 src = fetchurl {
13 url = "https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.tar.gz";
14 hash = "sha256-FU5+OGKaOi7sLfZm7foe4vLppXAY8X2fD48GTMINh1Q=";
15 };
16
17 nativeBuildInputs = [
18 libusb-compat-0_1
19 ];
20
21 makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
22
23 setSourceRoot = "sourceRoot=$(echo */commandline)";
24
25 installPhase = ''
26 runHook preInstall
27
28 mkdir -p $out/bin
29 install bootloadHID $out/bin
30
31 runHook postInstall
32 '';
33
34 meta = {
35 description = "USB boot loader for AVR microcontrollers with at least 2 kB of boot load section, e.g. ATMega8";
36 homepage = "https://www.obdev.at/products/vusb/bootloadhid.html";
37 license = lib.licenses.gpl2Plus;
38 maintainers = with lib.maintainers; [ thetaoofsu ];
39 mainProgram = "bootloadHID";
40 platforms = lib.platforms.unix;
41 };
42}