summary refs log tree commit diff
diff options
context:
space:
mode:
authorfigsoda <figsoda@pm.me>2021-10-29 10:10:03 -0400
committerfigsoda <figsoda@pm.me>2021-10-29 10:24:37 -0400
commit684c175f253db9a64bf7ea55f8204efe1ac57bb8 (patch)
treedf3b13909c5df89848cfb0e3725cf8e290928007
parent0214723ab30f86fad05ad456bf3d7f2779fcfa49 (diff)
downloadnixpkgs-684c175f253db9a64bf7ea55f8204efe1ac57bb8.tar
nixpkgs-684c175f253db9a64bf7ea55f8204efe1ac57bb8.tar.gz
nixpkgs-684c175f253db9a64bf7ea55f8204efe1ac57bb8.tar.bz2
nixpkgs-684c175f253db9a64bf7ea55f8204efe1ac57bb8.tar.lz
nixpkgs-684c175f253db9a64bf7ea55f8204efe1ac57bb8.tar.xz
nixpkgs-684c175f253db9a64bf7ea55f8204efe1ac57bb8.tar.zst
nixpkgs-684c175f253db9a64bf7ea55f8204efe1ac57bb8.zip
etcher: throw on unsupported systems
-rw-r--r--pkgs/tools/misc/etcher/default.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/tools/misc/etcher/default.nix b/pkgs/tools/misc/etcher/default.nix
index 7694303af25..51123f55b60 100644
--- a/pkgs/tools/misc/etcher/default.nix
+++ b/pkgs/tools/misc/etcher/default.nix
@@ -9,15 +9,19 @@
 }:
 
 let
+  inherit (stdenv.hostPlatform) system;
+
+  throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";
+
   sha256 = {
     "x86_64-linux" = "sha256-n8i4ZqjugeUfXpTzVgIwVomfPk6HvPEbTZLe/jFgwFg=";
     "i686-linux" = "sha256-lLGfhW6el2ZOcaykH1kTjGldXo7/0q5O8QnslnDlWAQ=";
-  }."${stdenv.system}";
+  }."${system}" or throwSystem;
 
   arch = {
     "x86_64-linux" = "amd64";
     "i686-linux" = "i386";
-  }."${stdenv.system}";
+  }."${system}" or throwSystem;
 
   electron = electron_12;