diff options
author | figsoda <figsoda@pm.me> | 2021-10-29 10:10:03 -0400 |
---|---|---|
committer | figsoda <figsoda@pm.me> | 2021-10-29 10:24:37 -0400 |
commit | 684c175f253db9a64bf7ea55f8204efe1ac57bb8 (patch) | |
tree | df3b13909c5df89848cfb0e3725cf8e290928007 /pkgs/tools/misc/etcher | |
parent | 0214723ab30f86fad05ad456bf3d7f2779fcfa49 (diff) |
etcher: throw on unsupported systems
Diffstat (limited to 'pkgs/tools/misc/etcher')
-rw-r--r-- | pkgs/tools/misc/etcher/default.nix | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/tools/misc/etcher/default.nix b/pkgs/tools/misc/etcher/default.nix index 7694303af25a2..51123f55b60b0 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; |