diff options
author | annalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com> | 2024-04-05 02:30:31 +0000 |
---|---|---|
committer | annalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com> | 2024-04-05 02:30:42 +0000 |
commit | 0d7dc0efc540648d7052b4e7cbb0b14c454e7206 (patch) | |
tree | 9de178833975c7a707b17a8b241f17cec2efd2b5 /pkgs/applications | |
parent | 86485bebac06ae466369b93fce9f92198895ccfc (diff) |
treewide: throw on unsupported system src access
Diffstat (limited to 'pkgs/applications')
9 files changed, 9 insertions, 9 deletions
diff --git a/pkgs/applications/audio/renoise/default.nix b/pkgs/applications/audio/renoise/default.nix index d3462ecc6ad5..a56d43876fb0 100644 --- a/pkgs/applications/audio/renoise/default.nix +++ b/pkgs/applications/audio/renoise/default.nix @@ -39,7 +39,7 @@ in stdenv.mkDerivation rec { releasePath else let - platform = platforms.${stdenv.system}; + platform = platforms.${stdenv.system} or (throw "unsupported system ${stdenv.hostPlatform.system}"); urlVersion = lib.replaceStrings [ "." ] [ "_" ] version; in fetchurl { url = diff --git a/pkgs/applications/gis/udig/default.nix b/pkgs/applications/gis/udig/default.nix index 8510918d4cab..264445336cd3 100644 --- a/pkgs/applications/gis/udig/default.nix +++ b/pkgs/applications/gis/udig/default.nix @@ -13,7 +13,7 @@ let hash = "sha256-Ihk3InHB3/tEYRqH2ozhokz2GN8Gfig5DJkO/8P1LJs="; }; }; - src = srcs.${stdenv.hostPlatform.system}; + src = srcs.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}"); meta = with lib; { description = "User-friendly Desktop Internet GIS"; diff --git a/pkgs/applications/graphics/sane/backends/brscan4/default.nix b/pkgs/applications/graphics/sane/backends/brscan4/default.nix index ec8efcc27c2a..c15b3033a265 100644 --- a/pkgs/applications/graphics/sane/backends/brscan4/default.nix +++ b/pkgs/applications/graphics/sane/backends/brscan4/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { url = "https://download.brother.com/welcome/dlf006645/${pname}-${version}.amd64.deb"; sha256 = "sha256-Gpr5456MCNpyam3g2qPo7S3aEZFMaUGR8bu7YmRY8xk="; }; - }."${stdenv.hostPlatform.system}"; + }."${stdenv.hostPlatform.system}" or (throw "unsupported system ${stdenv.hostPlatform.system}"); unpackPhase = '' ar x $src diff --git a/pkgs/applications/misc/1password-gui/default.nix b/pkgs/applications/misc/1password-gui/default.nix index 33a8328d688b..5f8b7c9068ac 100644 --- a/pkgs/applications/misc/1password-gui/default.nix +++ b/pkgs/applications/misc/1password-gui/default.nix @@ -51,7 +51,7 @@ let }; src = fetchurl { - inherit (sources.${channel}.${stdenv.system}) url hash; + inherit (sources.${channel}.${stdenv.system} or (throw "unsupported system ${stdenv.hostPlatform.system}")) url hash; }; meta = with lib; { diff --git a/pkgs/applications/networking/cluster/hadoop/default.nix b/pkgs/applications/networking/cluster/hadoop/default.nix index d5bae9ad885b..5f44e39d008c 100644 --- a/pkgs/applications/networking/cluster/hadoop/default.nix +++ b/pkgs/applications/networking/cluster/hadoop/default.nix @@ -35,7 +35,7 @@ let src = fetchurl { url = "mirror://apache/hadoop/common/hadoop-${finalAttrs.version}/hadoop-${finalAttrs.version}" + optionalString stdenv.isAarch64 "-aarch64" + ".tar.gz"; - inherit (platformAttrs.${stdenv.system}) hash; + inherit (platformAttrs.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}")) hash; }; doCheck = true; diff --git a/pkgs/applications/networking/instant-messengers/discord/default.nix b/pkgs/applications/networking/instant-messengers/discord/default.nix index 40e9c77e57a7..423f6cb2f1db 100644 --- a/pkgs/applications/networking/instant-messengers/discord/default.nix +++ b/pkgs/applications/networking/instant-messengers/discord/default.nix @@ -52,7 +52,7 @@ let }; aarch64-darwin = x86_64-darwin; }; - src = srcs.${stdenv.hostPlatform.system}.${branch}; + src = srcs.${stdenv.hostPlatform.system}.${branch} or (throw "${stdenv.hostPlatform.system} not supported on ${branch}"); meta = with lib; { description = "All-in-one cross-platform voice and text chat for gamers"; diff --git a/pkgs/applications/science/electronics/picoscope/default.nix b/pkgs/applications/science/electronics/picoscope/default.nix index c7242117b68c..3aa5cb22aa52 100644 --- a/pkgs/applications/science/electronics/picoscope/default.nix +++ b/pkgs/applications/science/electronics/picoscope/default.nix @@ -49,7 +49,7 @@ let # If we don't have a platform available, put a dummy version here, so at # least evaluation succeeds. sources = - (lib.importJSON ./sources.json).${stdenv.system} or { picoscope.version = "unknown"; }; + (lib.importJSON ./sources.json).${stdenv.system} or (throw "unsupported system ${stdenv.system}"); scopePkg = name: { url, version, sha256 }: diff --git a/pkgs/applications/version-management/radicle-upstream/default.nix b/pkgs/applications/version-management/radicle-upstream/default.nix index 97fec6257dd1..69c960ed78e8 100644 --- a/pkgs/applications/version-management/radicle-upstream/default.nix +++ b/pkgs/applications/version-management/radicle-upstream/default.nix @@ -15,7 +15,7 @@ let sha256 = "sha256-EuWGbn6qggi8/9Rci8iaXfuVKE+QXb1BHEYDvotR/q4="; }; }; - src = srcs.${stdenv.hostPlatform.system}; + src = srcs.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}"); contents = appimageTools.extract { inherit name src; }; diff --git a/pkgs/applications/virtualization/firecracker/default.nix b/pkgs/applications/virtualization/firecracker/default.nix index d9bab2169623..2c3ec6c9a75b 100644 --- a/pkgs/applications/virtualization/firecracker/default.nix +++ b/pkgs/applications/virtualization/firecracker/default.nix @@ -13,7 +13,7 @@ let dlbin = sha256: fetchurl { url = "${baseurl}/v${version}/firecracker-v${version}-${suffix}.tgz"; - sha256 = sha256."${stdenv.hostPlatform.system}"; + sha256 = sha256."${stdenv.hostPlatform.system}"or (throw "unsupported system ${stdenv.hostPlatform.system}"); }; in |