summary refs log tree commit diff
path: root/pkgs/applications
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/applications
parent76bf375a162d81d49b274eb07d6a33a74fe8850f (diff)
downloadnixpkgs-3a110ea3f96db56012f7f2707e842593a7d7c5b8.tar
nixpkgs-3a110ea3f96db56012f7f2707e842593a7d7c5b8.tar.gz
nixpkgs-3a110ea3f96db56012f7f2707e842593a7d7c5b8.tar.bz2
nixpkgs-3a110ea3f96db56012f7f2707e842593a7d7c5b8.tar.lz
nixpkgs-3a110ea3f96db56012f7f2707e842593a7d7c5b8.tar.xz
nixpkgs-3a110ea3f96db56012f7f2707e842593a7d7c5b8.tar.zst
nixpkgs-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/applications')
-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
6 files changed, 8 insertions, 7 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 {