7 stdenv.mkDerivation rec {
8 pname = "gcc-arm-embedded";
9 version = "10-2020-q4-major";
13 aarch64-linux = "aarch64-linux";
14 x86_64-darwin = "mac";
15 x86_64-linux = "x86_64-linux";
16 }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
19 url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-${suffix}.tar.bz2";
21 aarch64-linux = "0spkbh7vnda1w0nvavk342nb24nqxn8kln3k9j85mzil560qqg9l";
22 x86_64-darwin = "1h5xn0npwkilqxg7ifrymsl7kjpafr9r9gjqgcpb0kjxavijvldy";
23 x86_64-linux = "066nvhg5zdf3jvy9w23y439ghf1hvbicdyrrw9957gwb8ym4q4r1";
24 }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
35 ln -s $out/share/doc/gcc-arm-none-eabi/man $out/man
39 find $out -type f | while read f; do
40 patchelf "$f" > /dev/null 2>&1 || continue
41 patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
42 patchelf --set-rpath ${lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python27 ]} "$f" || true
47 description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors";
48 homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm";
49 license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
50 maintainers = with maintainers; [ prusnak ];
51 platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];