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