zoom-us: avoid manual throw (#426878)

authored by philiptaron.tngl.sh and committed by GitHub 647f87d1 64760df1

+10 -13
+10 -13
pkgs/by-name/zo/zoom-us/package.nix
··· 55 55 56 56 let 57 57 inherit (stdenv.hostPlatform) system; 58 - throwSystem = throw "Unsupported system: ${system}"; 59 58 60 59 # Zoom versions are released at different times for each platform 61 60 # and often with different versions. We write them on three lines ··· 83 82 84 83 unpacked = stdenv.mkDerivation { 85 84 pname = "zoom"; 86 - version = versions.${system} or throwSystem; 85 + version = versions.${system} or ""; 87 86 88 - src = srcs.${system} or throwSystem; 87 + src = srcs.${system}; 89 88 90 89 dontUnpack = stdenv.hostPlatform.isLinux; 91 90 unpackPhase = lib.optionalString stdenv.hostPlatform.isDarwin '' ··· 129 128 mv $out/usr/* $out/ 130 129 ''; 131 130 } 132 - .${system} or throwSystem 131 + .${system} 133 132 } 134 133 runHook postInstall 135 134 ''; ··· 159 158 mainProgram = "zoom"; 160 159 }; 161 160 }; 162 - packages.aarch64-darwin = unpacked; 163 - packages.x86_64-darwin = unpacked; 164 161 165 162 # linux definitions 166 163 ··· 237 234 ++ targetPkgs pkgs 238 235 ++ targetPkgsFixed; 239 236 237 + in 238 + if !stdenv.hostPlatform.isLinux then 239 + unpacked 240 + else 240 241 # We add the `unpacked` zoom archive to the FHS env 241 242 # and also bind-mount its `/opt` directory. 242 243 # This should assist Zoom in finding all its 243 244 # files in the places where it expects them to be. 244 - packages.x86_64-linux = buildFHSEnv { 245 + buildFHSEnv { 245 246 pname = "zoom"; # Will also be the program's name! 246 - version = versions.${system} or throwSystem; 247 + version = versions.${system} or ""; 247 248 248 249 targetPkgs = pkgs: (linuxGetDependencies pkgs) ++ [ unpacked ]; 249 250 extraBwrapArgs = [ "--ro-bind ${unpacked}/opt /opt" ]; ··· 263 264 inherit unpacked; 264 265 }; 265 266 inherit (unpacked) meta; 266 - }; 267 - 268 - in 269 - 270 - packages.${system} or throwSystem 267 + }