···33let
44 platform =
55 if lib.elem stdenv.system lib.platforms.unix then "unix"
66- else abort "Unknown platform for NetHack";
66+ else throw "Unknown platform for NetHack: ${stdenv.system}";
77 unixHint =
88 if stdenv.isLinux then "linux"
99 else if stdenv.isDarwin then "macosx10.10"
···99let arch =
1010 if stdenv.system == "x86_64-linux" then "64"
1111 else if stdenv.system == "i686-linux" then "32"
1212- else abort "Unsupported architecture";
1212+ else throw "Unsupported system ${stdenv.system}";
13131414in stdenv.mkDerivation rec {
1515 name = "cnijfilter-${version}";
+1-1
pkgs/misc/cups/drivers/kyocera/default.nix
···44 platform =
55 if stdenv.system == "x86_64-linux" then "64bit"
66 else if stdenv.system == "i686-linux" then "32bit"
77- else abort "Unsupported platform";
77+ else throw "Unsupported system: ${stdenv.system}";
8899 libPath = lib.makeLibraryPath [ cups ];
1010in
+1-1
pkgs/misc/drivers/sundtek/default.nix
···99 if isx86_64 then "64bit"
1010 else
1111 if isi686 then "32bit"
1212- else abort "${system} not considered in build derivation. Might still be supported.";
1212+ else throw "${system} not considered in build derivation. Might still be supported.";
13131414in
1515 stdenv.mkDerivation {
···1010 xorgVer = lib.concatStringsSep "." (lib.take 2 (lib.splitString "." xorgFullVer));
1111 x64 = if stdenv.system == "x86_64-linux" then true
1212 else if stdenv.system == "i686-linux" then false
1313- else abort "Parallels Tools for Linux only support {x86-64,i686}-linux targets";
1313+ else throw "Parallels Tools for Linux only support {x86-64,i686}-linux targets";
1414in
1515stdenv.mkDerivation rec {
1616 version = "${prl_major}.2.1-41615";
+12-5
pkgs/stdenv/generic/check-meta.nix
···125125126126 '';
127127128128- throwEvalHelp = { reason , errormsg ? "" }:
129129- throw (''
130130- Package ‘${attrs.name or "«name-missing»"}’ in ${pos_str} ${errormsg}, refusing to evaluate.
128128+ handleEvalIssue = { reason , errormsg ? "" }:
129129+ let
130130+ msg = ''
131131+ Package ‘${attrs.name or "«name-missing»"}’ in ${pos_str} ${errormsg}, refusing to evaluate.
132132+133133+ '' + (builtins.getAttr reason remediation) attrs;
134134+135135+ handler = if config ? "handleEvalIssue"
136136+ then config.handleEvalIssue reason
137137+ else throw;
138138+ in handler msg;
131139132132- '' + ((builtins.getAttr reason remediation) attrs));
133140134141 metaTypes = with lib.types; rec {
135142 # These keys are documented
···192199 validityCondition =
193200 let v = checkValidity attrs;
194201 in if !v.valid
195195- then throwEvalHelp (removeAttrs v ["valid"])
202202+ then handleEvalIssue (removeAttrs v ["valid"])
196203 else true;
197204198205in
+3-2
pkgs/tools/misc/mprime/default.nix
···55 if stdenv.system == "x86_64-linux" then "linux64"
66 else if stdenv.system == "i686-linux" then "linux"
77 else if stdenv.system == "x86_64-darwin" then "macosx64"
88- else abort "Unsupported platform";
88+ else throwSystem;
99+ throwSystem = throw "Unsupported system: ${stdenv.system}";
910 gwnum =
1011 if stdenv.system == "x86_64-linux" then "make64"
1112 else if stdenv.system == "i686-linux" then "makefile"
1213 else if stdenv.system == "x86_64-darwin" then "makemac"
1313- else abort "Unsupported platform";
1414+ else throwSystem;
1415in
15161617stdenv.mkDerivation {
+3-2
pkgs/tools/networking/logmein-hamachi/default.nix
···88 arch =
99 if stdenv.system == "x86_64-linux" then "x64"
1010 else if stdenv.system == "i686-linux" then "x86"
1111- else abort "Unsupported architecture";
1111+ else throwSystem;
1212+ throwSystem = throw "Unsupported system: ${stdenv.system}";
1213 sha256 =
1314 if stdenv.system == "x86_64-linux" then "011xg1frhjavv6zj1y3da0yh7rl6v1ax6xy2g8fk3sry9bi2p4j3"
1415 else if stdenv.system == "i686-linux" then "03ml9xv19km99f0z7fpr21b1zkxvw7q39kjzd8wpb2pds51wnc62"
1515- else abort "Unsupported architecture";
1616+ else throwSystem;
1617 libraries = stdenv.lib.makeLibraryPath [ stdenv.cc.cc ];
17181819in stdenv.mkDerivation rec {