summary refs log tree commit diff
path: root/pkgs/applications/networking/bittorrentsync
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/networking/bittorrentsync
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/networking/bittorrentsync')
-rw-r--r--pkgs/applications/networking/bittorrentsync/generic.nix5
1 files changed, 3 insertions, 2 deletions
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