about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/misc/avr/libc
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/misc/avr/libc')
-rw-r--r--nixpkgs/pkgs/development/misc/avr/libc/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/misc/avr/libc/default.nix b/nixpkgs/pkgs/development/misc/avr/libc/default.nix
new file mode 100644
index 000000000000..9b3ac75d1104
--- /dev/null
+++ b/nixpkgs/pkgs/development/misc/avr/libc/default.nix
@@ -0,0 +1,31 @@
+{ 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";
+  };
+
+  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 ];
+  };
+}