mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-14 22:47:49 +00:00
treewide: throw on unsupported system src access
This commit is contained in:
parent
86485bebac
commit
0d7dc0efc5
@ -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 =
|
||||
|
@ -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";
|
||||
|
@ -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
|
||||
|
@ -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; {
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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";
|
||||
|
@ -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 }:
|
||||
|
@ -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; };
|
||||
|
||||
|
@ -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
|
||||
|
@ -80,7 +80,7 @@ let result = stdenv.mkDerivation rec {
|
||||
in requireFile {
|
||||
name = "jdk-${productVersion}u${patchVersion}-${platformName}.tar.gz";
|
||||
url = "http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html";
|
||||
sha256 = sha256.${stdenv.hostPlatform.system};
|
||||
sha256 = sha256.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ file makeWrapper ]
|
||||
|
@ -24,7 +24,7 @@ let
|
||||
sourcePerArch.${cpuName}.version or (throw "unsupported CPU ${cpuName}");
|
||||
|
||||
src = fetchurl {
|
||||
inherit (sourcePerArch.${cpuName}) url sha256;
|
||||
inherit (sourcePerArch.${cpuName} or (throw "unsupported system ${stdenv.hostPlatform.system}")) url sha256;
|
||||
};
|
||||
|
||||
# See: https://github.com/NixOS/patchelf/issues/10
|
||||
|
@ -73,7 +73,7 @@ let
|
||||
platforms."aarch64-linux".sha256 = "16sbfk599h96wcsmpbxlwsvq0n1pssmm8dpwmjsqfrn1464dvs68";
|
||||
platforms."x86_64-linux".sha256 = "1wa4nv28saz96kar9svdarfz6c4rnbcqz0rqxzl9zclnhfzhqdiw";
|
||||
|
||||
platformInfo = builtins.getAttr stdenv.hostPlatform.system platforms;
|
||||
platformInfo = platforms.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cef-binary";
|
||||
|
@ -20,7 +20,7 @@ in
|
||||
stdenv.mkDerivation {
|
||||
inherit version;
|
||||
pname = "meteor";
|
||||
src = srcs.${system};
|
||||
src = srcs.${system} or (throw "unsupported system ${system}");
|
||||
|
||||
#dontStrip = true;
|
||||
|
||||
|
@ -37,7 +37,7 @@ stdenv.mkDerivation {
|
||||
pname = "rar";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl (srcs.${stdenv.hostPlatform.system});
|
||||
src = fetchurl (srcs.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}"));
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
|
@ -26,7 +26,7 @@ stdenv.mkDerivation {
|
||||
inherit version;
|
||||
pname = "geekbench";
|
||||
|
||||
src = fetchurl (sources.${stdenv.system});
|
||||
src = fetchurl (sources.${stdenv.system} or (throw "unsupported system ${stdenv.hostPlatform.system}"));
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
@ -27,7 +27,7 @@ stdenv.mkDerivation {
|
||||
inherit version;
|
||||
pname = "geekbench";
|
||||
|
||||
src = fetchurl (sources.${stdenv.system});
|
||||
src = fetchurl (sources.${stdenv.system} or (throw "unsupported system ${stdenv.hostPlatform.system}"));
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
|
||||
url = "https://github.com/manga-download/hakuneko/releases/download/v${version}/hakuneko-desktop_${version}_linux_i386.deb";
|
||||
sha256 = "32017d26bafffaaf0a83dd6954d3926557014af4022a972371169c56c0e3d98b";
|
||||
};
|
||||
}."${stdenv.hostPlatform.system}";
|
||||
}."${stdenv.hostPlatform.system}" or (throw "unsupported system ${stdenv.hostPlatform.system}");
|
||||
|
||||
dontBuild = true;
|
||||
dontConfigure = true;
|
||||
|
@ -19,7 +19,7 @@ in stdenv.mkDerivation rec {
|
||||
inherit version;
|
||||
pname = "sonar-scanner-cli";
|
||||
|
||||
src = fetchurl sonarScannerArchPackage.${stdenv.hostPlatform.system};
|
||||
src = fetchurl sonarScannerArchPackage.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
|
||||
|
||||
nativeBuildInputs = [ unzip ];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user