rust: add support for armv6l-linux and armv7l-linux

This commit is contained in:
Ben Wolsieffer
2018-12-20 19:28:09 -05:00
parent 9ab168b500
commit 83ac9c07e4
9 changed files with 32 additions and 50 deletions

View File

@@ -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