1{
2 lib,
3 stdenv,
4 fetchurl,
5 automake,
6 autoconf,
7}:
8
9stdenv.mkDerivation (finalAttrs: {
10 pname = "avr-libc";
11 version = "2.2.1";
12
13 tag_version = builtins.replaceStrings [ "." ] [ "_" ] finalAttrs.version;
14 src = fetchurl {
15 url = "https://github.com/avrdudes/avr-libc/releases/download/avr-libc-${finalAttrs.tag_version}-release/avr-libc-${finalAttrs.version}.tar.bz2";
16 hash = "sha256-AGpjBsu8k4w721g6xU+T/n18jPl/nN6R+RxvsCc6tGU=";
17 };
18
19 nativeBuildInputs = [
20 automake
21 autoconf
22 ];
23
24 # Make sure we don't strip the libraries in lib/gcc/avr.
25 stripDebugList = [ "bin" ];
26 dontPatchELF = true;
27
28 enableParallelBuilding = true;
29
30 passthru = {
31 incdir = "/avr/include";
32 };
33
34 meta = with lib; {
35 description = "C runtime library for AVR microcontrollers";
36 homepage = "https://github.com/avrdudes/avr-libc";
37 changelog = "https://github.com/avrdudes/avr-libc/blob/avr-libc-${finalAttrs.tag_version}-release/NEWS";
38 license = licenses.bsd3;
39 platforms = [ "avr-none" ];
40 maintainers = with maintainers; [
41 mguentner
42 emilytrau
43 ];
44 };
45})