nixpkgs/pkgs/development/misc/avr/libc/default.nix
pennae b2844f89d1 avrlibc: hook up libdir for cc-wrapper
-B must be set to the root directory of avrlibc, otherwise gcc cannot
locate crt objects for some attiny devices. -L trains as set by
bintools-wrapper are not necessary with -B set correctly because gcc
takes care of that, and likewise we can drop the -B train from
cc-wrapper because the one spec is enough.
2023-12-03 21:44:27 +11:00

33 lines
844 B
Nix

{ lib, stdenv, fetchurl, automake, autoconf }:
stdenv.mkDerivation rec {
pname = "avr-libc";
version = "2.1.0";
src = fetchurl {
url = "https://download.savannah.gnu.org/releases/avr-libc/avr-libc-${version}.tar.bz2";
sha256 = "1s2lnqsbr1zs7dvsbyyckay52lm8mbjjaqf3cyx5qpcbq3jwx10b";
};
nativeBuildInputs = [ automake autoconf ];
# Make sure we don't strip the libraries in lib/gcc/avr.
stripDebugList = [ "bin" ];
dontPatchELF = true;
enableParallelBuilding = true;
passthru = {
incdir = "/avr/include";
libdir = "/avr/lib";
};
meta = with lib; {
description = "a C runtime library for AVR microcontrollers";
homepage = "https://github.com/avrdudes/avr-libc";
license = licenses.bsd3;
platforms = [ "avr-none" ];
maintainers = with maintainers; [ mguentner emilytrau ];
};
}