about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2017-12-06 00:06:43 +0100
committerGraham Christensen <graham@grahamc.com>2017-12-12 18:08:10 -0500
commit3a110ea3f96db56012f7f2707e842593a7d7c5b8 (patch)
tree727bb87c20c860814a494875af0b874d3b977bbb /pkgs/build-support
parent76bf375a162d81d49b274eb07d6a33a74fe8850f (diff)
downloadnixlib-3a110ea3f96db56012f7f2707e842593a7d7c5b8.tar
nixlib-3a110ea3f96db56012f7f2707e842593a7d7c5b8.tar.gz
nixlib-3a110ea3f96db56012f7f2707e842593a7d7c5b8.tar.bz2
nixlib-3a110ea3f96db56012f7f2707e842593a7d7c5b8.tar.lz
nixlib-3a110ea3f96db56012f7f2707e842593a7d7c5b8.tar.xz
nixlib-3a110ea3f96db56012f7f2707e842593a7d7c5b8.tar.zst
nixlib-3a110ea3f96db56012f7f2707e842593a7d7c5b8.zip
treewide platform checks: `abort` -> `throw`
They aren't meant to be critical (uncatchable) errors.
Tested with nix-env + checkMeta:
[ "x86_64-linux" "i686-linux" "x86_64-darwin" "aarch64-linux" ]
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/rust/cargo-vendor.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/build-support/rust/cargo-vendor.nix b/pkgs/build-support/rust/cargo-vendor.nix
index 6b50f8b83e73..9c379eaa3337 100644
--- a/pkgs/build-support/rust/cargo-vendor.nix
+++ b/pkgs/build-support/rust/cargo-vendor.nix
@@ -8,13 +8,15 @@ let
     x86_64-linux = "1hxlavcxy374yypfamlkygjg662lhll8j434qcvdawkvlidg5ii5";
     x86_64-darwin = "1jkvhh710gwjnnjx59kaplx2ncfvkx9agfa76rr94sbjqq4igddm";
   };
-  hash = hashes. ${system} or (throw "missing bootstrap hash for platform ${system}");
+  hash = hashes. ${system} or badSystem;
+
+  badSystem = throw "missing bootstrap hash for platform ${system}";
 
   platforms = {
     x86_64-linux = "x86_64-unknown-linux-musl";
     x86_64-darwin = "x86_64-apple-darwin";
   };
-  platform = platforms . ${system};
+  platform = platforms . ${system} or badSystem;
 
 in stdenv.mkDerivation {
   name = "cargo-vendor-${version}";