1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

gcc-arm-embedded: add darwin support

This commit is contained in:
Theodore Witkamp 2019-03-28 10:15:38 -07:00
parent b306b4cf1a
commit daf1f0bc22
3 changed files with 34 additions and 15 deletions

View file

@ -5,16 +5,17 @@ stdenv.mkDerivation rec {
version = "6-2017-q2-update";
subdir = "6-2017q2";
platformString =
if stdenv.isLinux then "linux"
else if stdenv.isDarwin then "mac"
else throw "unsupported platform";
urlString = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-${platformString}.tar.bz2";
src =
if stdenv.isLinux then fetchurl { url=urlString; sha256="1hvwi02mx34al525sngnl0cm7dkmzxfkb1brq9kvbv28wcplp3p6"; }
else if stdenv.isDarwin then fetchurl { url=urlString; sha256="0019ylpq4inq7p5gydpmc9m8ni72fz2csrjlqmgx1698998q0c3x"; }
if stdenv.isLinux then
fetchurl {
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-linux.tar.bz2";
sha256="1hvwi02mx34al525sngnl0cm7dkmzxfkb1brq9kvbv28wcplp3p6";
}
else if stdenv.isDarwin then
fetchurl {
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-mac.tar.bz2";
sha256="0019ylpq4inq7p5gydpmc9m8ni72fz2csrjlqmgx1698998q0c3x";
}
else throw "unsupported platform";
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];

View file

@ -7,9 +7,18 @@ stdenv.mkDerivation rec {
version = "7-2018-q2-update";
subdir = "7-2018q2";
urlString = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-linux.tar.bz2";
src = fetchurl { url=urlString; sha256="0sgysp3hfpgrkcbfiwkp0a7ymqs02khfbrjabm52b5z61sgi05xv"; };
src =
if stdenv.isLinux then
fetchurl {
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-linux.tar.bz2";
sha256="0sgysp3hfpgrkcbfiwkp0a7ymqs02khfbrjabm52b5z61sgi05xv";
}
else if stdenv.isDarwin then
fetchurl {
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-mac.tar.bz2";
sha256="0nc7m0mpa39qyhfyydxkkyqm7spfc27xf6ygi2vd2aym4r9azi61";
}
else throw "unsupported platform";
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];

View file

@ -7,9 +7,18 @@ stdenv.mkDerivation rec {
version = "8-2018-q4-major";
subdir = "8-2018q4";
urlString = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-linux.tar.bz2";
src = fetchurl { url=urlString; sha256="fb31fbdfe08406ece43eef5df623c0b2deb8b53e405e2c878300f7a1f303ee52"; };
src =
if stdenv.isLinux then
fetchurl {
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-linux.tar.bz2";
sha256="fb31fbdfe08406ece43eef5df623c0b2deb8b53e405e2c878300f7a1f303ee52";
}
else if stdenv.isDarwin then
fetchurl {
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-mac.tar.bz2";
sha256="0q44r57fizpk1z3ngcjwal3rxgsnzjyfknpgwlwzmw5r9p98wlhb";
}
else throw "unsupported platform";
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];