diff options
author | Ben Wolsieffer <benwolsieffer@gmail.com> | 2018-12-20 19:28:09 -0500 |
---|---|---|
committer | Ben Wolsieffer <benwolsieffer@gmail.com> | 2019-11-23 19:19:31 -0500 |
commit | 83ac9c07e4df352e177ebdf978320089a137183a (patch) | |
tree | e296c9d6e056eb1a18fd3807a2f42b6e14413306 /pkgs/development/compilers/rust/bootstrap.nix | |
parent | 9ab168b500e8888184975d47284fe3114da0e1b9 (diff) | |
download | nixpkgs-83ac9c07e4df352e177ebdf978320089a137183a.tar nixpkgs-83ac9c07e4df352e177ebdf978320089a137183a.tar.gz nixpkgs-83ac9c07e4df352e177ebdf978320089a137183a.tar.bz2 nixpkgs-83ac9c07e4df352e177ebdf978320089a137183a.tar.lz nixpkgs-83ac9c07e4df352e177ebdf978320089a137183a.tar.xz nixpkgs-83ac9c07e4df352e177ebdf978320089a137183a.tar.zst nixpkgs-83ac9c07e4df352e177ebdf978320089a137183a.zip |
rust: add support for armv6l-linux and armv7l-linux
Diffstat (limited to 'pkgs/development/compilers/rust/bootstrap.nix')
-rw-r--r-- | pkgs/development/compilers/rust/bootstrap.nix | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/pkgs/development/compilers/rust/bootstrap.nix b/pkgs/development/compilers/rust/bootstrap.nix index 54b2d3016e5..7c0b46d5593 100644 --- a/pkgs/development/compilers/rust/bootstrap.nix +++ b/pkgs/development/compilers/rust/bootstrap.nix @@ -1,24 +1,11 @@ -{ stdenv, fetchurl, callPackage, version, hashes }: +{ stdenv, fetchurl, rust, callPackage, version, hashes }: let - platform = - if stdenv.hostPlatform.system == "i686-linux" - then "i686-unknown-linux-gnu" - else if stdenv.hostPlatform.system == "x86_64-linux" - then "x86_64-unknown-linux-gnu" - else if stdenv.hostPlatform.system == "armv7l-linux" - then "armv7-unknown-linux-gnueabihf" - else if stdenv.hostPlatform.system == "aarch64-linux" - then "aarch64-unknown-linux-gnu" - else if stdenv.hostPlatform.system == "i686-darwin" - then "i686-apple-darwin" - else if stdenv.hostPlatform.system == "x86_64-darwin" - then "x86_64-apple-darwin" - else throw "missing bootstrap url for platform ${stdenv.hostPlatform.system}"; + platform = rust.toRustTarget stdenv.hostPlatform; src = fetchurl { url = "https://static.rust-lang.org/dist/rust-${version}-${platform}.tar.gz"; - sha256 = hashes.${platform}; + sha256 = hashes.${platform} or (throw "missing bootstrap url for platform ${platform}"); }; in callPackage ./binary.nix |