summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/applications/graphics/unigine-valley/default.nix2
-rw-r--r--pkgs/applications/misc/googleearth/default.nix2
-rw-r--r--pkgs/applications/misc/playonlinux/default.nix2
-rw-r--r--pkgs/applications/networking/bittorrentsync/generic.nix5
-rw-r--r--pkgs/applications/networking/remote/teamviewer/default.nix2
-rw-r--r--pkgs/applications/networking/resilio-sync/default.nix2
-rw-r--r--pkgs/build-support/rust/cargo-vendor.nix6
-rw-r--r--pkgs/development/compilers/jetbrains-jdk/default.nix2
-rw-r--r--pkgs/development/compilers/oraclejdk/jdk-linux-base.nix2
-rw-r--r--pkgs/development/libraries/bootil/default.nix2
-rw-r--r--pkgs/development/tools/misc/iozone/default.nix2
-rw-r--r--pkgs/development/tools/misc/saleae-logic/default.nix2
-rw-r--r--pkgs/games/nethack/default.nix2
-rw-r--r--pkgs/games/steam/default.nix2
-rw-r--r--pkgs/misc/cups/drivers/cnijfilter_4_00/default.nix2
-rw-r--r--pkgs/misc/cups/drivers/kyocera/default.nix2
-rw-r--r--pkgs/misc/drivers/sundtek/default.nix2
-rw-r--r--pkgs/os-specific/linux/broadcom-sta/default.nix2
-rw-r--r--pkgs/os-specific/linux/prl-tools/default.nix2
-rw-r--r--pkgs/tools/misc/mprime/default.nix5
-rw-r--r--pkgs/tools/networking/logmein-hamachi/default.nix5
21 files changed, 30 insertions, 25 deletions
diff --git a/pkgs/applications/graphics/unigine-valley/default.nix b/pkgs/applications/graphics/unigine-valley/default.nix
index 31908dcfd9f..f1adc6bd10e 100644
--- a/pkgs/applications/graphics/unigine-valley/default.nix
+++ b/pkgs/applications/graphics/unigine-valley/default.nix
@@ -22,7 +22,7 @@ let
   else if stdenv.system == "i686-linux" then
     "x86"
   else
-    abort "Unsupported platform";
+    throw "Unsupported platform ${stdenv.system}";
 
 in
   stdenv.mkDerivation rec {
diff --git a/pkgs/applications/misc/googleearth/default.nix b/pkgs/applications/misc/googleearth/default.nix
index df8cb71d6f9..52903a1f801 100644
--- a/pkgs/applications/misc/googleearth/default.nix
+++ b/pkgs/applications/misc/googleearth/default.nix
@@ -6,7 +6,7 @@ let
   arch =
     if stdenv.system == "x86_64-linux" then "amd64"
     else if stdenv.system == "i686-linux" then "i386"
-    else abort "Unsupported architecture";
+    else throw "Unsupported system ${stdenv.system}";
   sha256 =
     if arch == "amd64"
     then "0dwnppn5snl5bwkdrgj4cyylnhngi0g66fn2k41j3dvis83x24k6"
diff --git a/pkgs/applications/misc/playonlinux/default.nix b/pkgs/applications/misc/playonlinux/default.nix
index 3f39a356312..44650d001e3 100644
--- a/pkgs/applications/misc/playonlinux/default.nix
+++ b/pkgs/applications/misc/playonlinux/default.nix
@@ -48,7 +48,7 @@ let
   ld32 =
     if stdenv.system == "x86_64-linux" then "${stdenv.cc}/nix-support/dynamic-linker-m32"
     else if stdenv.system == "i686-linux" then "${stdenv.cc}/nix-support/dynamic-linker"
-    else abort "Unsupported platform for PlayOnLinux: ${stdenv.system}";
+    else throw "Unsupported platform for PlayOnLinux: ${stdenv.system}";
   ld64 = "${stdenv.cc}/nix-support/dynamic-linker";
   libs = pkgs: stdenv.lib.makeLibraryPath [ pkgs.xlibs.libX11 ];
 
diff --git a/pkgs/applications/networking/bittorrentsync/generic.nix b/pkgs/applications/networking/bittorrentsync/generic.nix
index 3fa7fe18040..eb988471c8c 100644
--- a/pkgs/applications/networking/bittorrentsync/generic.nix
+++ b/pkgs/applications/networking/bittorrentsync/generic.nix
@@ -4,8 +4,9 @@ let
   arch = {
     "x86_64-linux" = "x64";
     "i686-linux" = "i386";
-  }.${stdenv.system};
+  }.${stdenv.system} or throwSystem;
   libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.libc ];
+  throwSystem = throw "Unsupported system: ${stdenv.system}";
 in
 
 stdenv.mkDerivation rec {
@@ -19,7 +20,7 @@ stdenv.mkDerivation rec {
       "https://download-cdn.getsync.com/${version}/linux-${arch}/BitTorrent-Sync_${arch}.tar.gz"
       "http://syncapp.bittorrent.com/${version}/btsync_${arch}-${version}.tar.gz"
     ];
-    sha256 = sha256s.${stdenv.system};
+    sha256 = sha256s.${stdenv.system} or throwSystem;
   };
 
   dontStrip = true; # Don't strip, otherwise patching the rpaths breaks
diff --git a/pkgs/applications/networking/remote/teamviewer/default.nix b/pkgs/applications/networking/remote/teamviewer/default.nix
index d002b51625c..4ff649dbf2a 100644
--- a/pkgs/applications/networking/remote/teamviewer/default.nix
+++ b/pkgs/applications/networking/remote/teamviewer/default.nix
@@ -4,7 +4,7 @@ let
   ld32 =
     if stdenv.system == "i686-linux" then "${stdenv.cc}/nix-support/dynamic-linker"
     else if stdenv.system == "x86_64-linux" then "${stdenv.cc}/nix-support/dynamic-linker-m32"
-    else abort "Unsupported architecture";
+    else throw "Unsupported system ${stdenv.system}";
   ld64 = "${stdenv.cc}/nix-support/dynamic-linker";
 
   mkLdPath = ps: lib.makeLibraryPath (with ps; [ qt4 dbus alsaLib ]);
diff --git a/pkgs/applications/networking/resilio-sync/default.nix b/pkgs/applications/networking/resilio-sync/default.nix
index 7622cb76ad2..5e94106a48f 100644
--- a/pkgs/applications/networking/resilio-sync/default.nix
+++ b/pkgs/applications/networking/resilio-sync/default.nix
@@ -4,7 +4,7 @@ let
   arch = {
     "x86_64-linux" = "x64";
     "i686-linux" = "i386";
-  }.${stdenv.system};
+  }.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}");
   libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.libc ];
 
 in stdenv.mkDerivation rec {
diff --git a/pkgs/build-support/rust/cargo-vendor.nix b/pkgs/build-support/rust/cargo-vendor.nix
index 6b50f8b83e7..9c379eaa333 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}";
diff --git a/pkgs/development/compilers/jetbrains-jdk/default.nix b/pkgs/development/compilers/jetbrains-jdk/default.nix
index 383283309dd..7f23a4d507e 100644
--- a/pkgs/development/compilers/jetbrains-jdk/default.nix
+++ b/pkgs/development/compilers/jetbrains-jdk/default.nix
@@ -16,7 +16,7 @@ let drv = stdenv.mkDerivation rec {
       sha256 = "1768f02i3dxdbxn8n29d522h8v0mkgnhpb8ixzq5p54vwjmfl6md";
     }
   else
-    abort "unsupported system: ${stdenv.system}";
+    throw "unsupported system: ${stdenv.system}";
 
   nativeBuildInputs = [ file ];
 
diff --git a/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix b/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
index fadae3eb592..554c322781f 100644
--- a/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
+++ b/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
@@ -44,7 +44,7 @@ assert stdenv.system == "i686-linux"
 assert swingSupport -> xorg != null;
 
 let
-  abortArch = abort "jdk requires i686-linux, x86_64-linux, aarch64-linux or armv7l-linux";
+  abortArch = throw "Unsupported system: ${stdenv.system}";
 
   /**
    * The JRE libraries are in directories that depend on the CPU.
diff --git a/pkgs/development/libraries/bootil/default.nix b/pkgs/development/libraries/bootil/default.nix
index 727c6bfc4f3..160f6230594 100644
--- a/pkgs/development/libraries/bootil/default.nix
+++ b/pkgs/development/libraries/bootil/default.nix
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
   platform =
     if stdenv.isLinux then "linux"
     else if stdenv.isDarwin then "macosx"
-    else abort "unrecognized platform";
+    else throw "unrecognized system ${stdenv.system}";
 
   buildInputs = [ premake4 ];
 
diff --git a/pkgs/development/tools/misc/iozone/default.nix b/pkgs/development/tools/misc/iozone/default.nix
index 0bbab096c73..31d70d280e3 100644
--- a/pkgs/development/tools/misc/iozone/default.nix
+++ b/pkgs/development/tools/misc/iozone/default.nix
@@ -9,7 +9,7 @@ let
     "macosx"
   else if stdenv.system == "aarch64-linux" then
     "linux-arm"
-  else abort "Platform ${stdenv.system} not yet supported.";
+  else throw "Platform ${stdenv.system} not yet supported.";
 in
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/development/tools/misc/saleae-logic/default.nix b/pkgs/development/tools/misc/saleae-logic/default.nix
index 86be86cb6d6..de2d6c5b7bf 100644
--- a/pkgs/development/tools/misc/saleae-logic/default.nix
+++ b/pkgs/development/tools/misc/saleae-logic/default.nix
@@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
         sha256 = "1skx2pfnic7pyss7c69qb7kg2xvflpxf112xkf9awk516dw1w4h7";
       }
     else
-      abort "Saleae Logic software requires i686-linux or x86_64-linux";
+      throw "Saleae Logic software requires i686-linux or x86_64-linux";
 
   desktopItem = makeDesktopItem {
     name = "saleae-logic";
diff --git a/pkgs/games/nethack/default.nix b/pkgs/games/nethack/default.nix
index 92d87697fb1..d9ab3ee833b 100644
--- a/pkgs/games/nethack/default.nix
+++ b/pkgs/games/nethack/default.nix
@@ -3,7 +3,7 @@
 let
   platform =
     if lib.elem stdenv.system lib.platforms.unix then "unix"
-    else abort "Unknown platform for NetHack";
+    else throw "Unknown platform for NetHack: ${stdenv.system}";
   unixHint =
     if stdenv.isLinux then "linux"
     else if stdenv.isDarwin then "macosx10.10"
diff --git a/pkgs/games/steam/default.nix b/pkgs/games/steam/default.nix
index 54805e91b2b..6a6485d4331 100644
--- a/pkgs/games/steam/default.nix
+++ b/pkgs/games/steam/default.nix
@@ -6,7 +6,7 @@ let
   self = rec {
     steamArch = if pkgs.stdenv.system == "x86_64-linux" then "amd64"
                 else if pkgs.stdenv.system == "i686-linux" then "i386"
-                else abort "Unsupported platform";
+                else throw "Unsupported platform: ${pkgs.stdenv.system}";
 
     steam-runtime = callPackage ./runtime.nix { };
     steam-runtime-wrapped = callPackage ./runtime-wrapped.nix { };
diff --git a/pkgs/misc/cups/drivers/cnijfilter_4_00/default.nix b/pkgs/misc/cups/drivers/cnijfilter_4_00/default.nix
index 2856aee4a5d..b83e84154bb 100644
--- a/pkgs/misc/cups/drivers/cnijfilter_4_00/default.nix
+++ b/pkgs/misc/cups/drivers/cnijfilter_4_00/default.nix
@@ -9,7 +9,7 @@
 let arch = 
   if stdenv.system == "x86_64-linux" then "64"
     else if stdenv.system == "i686-linux" then "32"
-    else abort "Unsupported architecture";
+    else throw "Unsupported system ${stdenv.system}";
 
 in stdenv.mkDerivation rec {
   name = "cnijfilter-${version}";
diff --git a/pkgs/misc/cups/drivers/kyocera/default.nix b/pkgs/misc/cups/drivers/kyocera/default.nix
index be9d4f83709..17e5b37ed44 100644
--- a/pkgs/misc/cups/drivers/kyocera/default.nix
+++ b/pkgs/misc/cups/drivers/kyocera/default.nix
@@ -4,7 +4,7 @@ let
   platform =
     if stdenv.system == "x86_64-linux" then "64bit"
     else if stdenv.system == "i686-linux" then "32bit"
-         else abort "Unsupported platform";
+         else throw "Unsupported system: ${stdenv.system}";
 
   libPath = lib.makeLibraryPath [ cups ];
 in
diff --git a/pkgs/misc/drivers/sundtek/default.nix b/pkgs/misc/drivers/sundtek/default.nix
index 4dc0f2591d8..35a9bd2e384 100644
--- a/pkgs/misc/drivers/sundtek/default.nix
+++ b/pkgs/misc/drivers/sundtek/default.nix
@@ -9,7 +9,7 @@ let
     if isx86_64 then "64bit"
     else
     if isi686 then "32bit"
-    else abort "${system} not considered in build derivation. Might still be supported.";
+    else throw "${system} not considered in build derivation. Might still be supported.";
 
 in
   stdenv.mkDerivation {
diff --git a/pkgs/os-specific/linux/broadcom-sta/default.nix b/pkgs/os-specific/linux/broadcom-sta/default.nix
index 3143968d75c..8a42e5a0b26 100644
--- a/pkgs/os-specific/linux/broadcom-sta/default.nix
+++ b/pkgs/os-specific/linux/broadcom-sta/default.nix
@@ -16,7 +16,7 @@ stdenv.mkDerivation {
 
   src = fetchurl {
     url = "https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/${tarball}";
-    sha256 = hashes."${stdenv.system}";
+    sha256 = hashes.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}");
   };
 
   hardeningDisable = [ "pic" ];
diff --git a/pkgs/os-specific/linux/prl-tools/default.nix b/pkgs/os-specific/linux/prl-tools/default.nix
index 9fe331e6cb1..12b361e953e 100644
--- a/pkgs/os-specific/linux/prl-tools/default.nix
+++ b/pkgs/os-specific/linux/prl-tools/default.nix
@@ -10,7 +10,7 @@ let xorgFullVer = (builtins.parseDrvName xorg.xorgserver.name).version;
     xorgVer = lib.concatStringsSep "." (lib.take 2 (lib.splitString "." xorgFullVer));
     x64 = if stdenv.system == "x86_64-linux" then true
           else if stdenv.system == "i686-linux" then false
-          else abort "Parallels Tools for Linux only support {x86-64,i686}-linux targets";
+          else throw "Parallels Tools for Linux only support {x86-64,i686}-linux targets";
 in
 stdenv.mkDerivation rec {
   version = "${prl_major}.2.1-41615";
diff --git a/pkgs/tools/misc/mprime/default.nix b/pkgs/tools/misc/mprime/default.nix
index 2aea2530057..3ef039507d4 100644
--- a/pkgs/tools/misc/mprime/default.nix
+++ b/pkgs/tools/misc/mprime/default.nix
@@ -5,12 +5,13 @@ let
     if stdenv.system == "x86_64-linux" then "linux64"
     else if stdenv.system == "i686-linux" then "linux"
     else if stdenv.system == "x86_64-darwin" then "macosx64"
-    else abort "Unsupported platform";
+    else throwSystem;
+  throwSystem = throw "Unsupported system: ${stdenv.system}";
   gwnum =
     if stdenv.system == "x86_64-linux" then "make64"
     else if stdenv.system == "i686-linux" then "makefile"
     else if stdenv.system == "x86_64-darwin" then "makemac"
-    else abort "Unsupported platform";
+    else throwSystem;
 in
 
 stdenv.mkDerivation {
diff --git a/pkgs/tools/networking/logmein-hamachi/default.nix b/pkgs/tools/networking/logmein-hamachi/default.nix
index 6808c5c0a42..bbee6546b2f 100644
--- a/pkgs/tools/networking/logmein-hamachi/default.nix
+++ b/pkgs/tools/networking/logmein-hamachi/default.nix
@@ -8,11 +8,12 @@ let
   arch =
     if stdenv.system == "x86_64-linux" then "x64"
     else if stdenv.system == "i686-linux" then "x86"
-    else abort "Unsupported architecture";
+    else throwSystem;
+  throwSystem = throw "Unsupported system: ${stdenv.system}";
   sha256 =
     if stdenv.system == "x86_64-linux" then "011xg1frhjavv6zj1y3da0yh7rl6v1ax6xy2g8fk3sry9bi2p4j3"
     else if stdenv.system == "i686-linux" then "03ml9xv19km99f0z7fpr21b1zkxvw7q39kjzd8wpb2pds51wnc62"
-    else abort "Unsupported architecture";
+    else throwSystem;
   libraries = stdenv.lib.makeLibraryPath [ stdenv.cc.cc ];
 
 in stdenv.mkDerivation rec {