1 { stdenv, lib, fetchurl, zlib, unzip }:
3 stdenv.mkDerivation rec {
4 pname = "sauce-connect";
9 x86_64-linux = fetchurl {
10 url = "https://saucelabs.com/downloads/sc-${version}-linux.tar.gz";
11 hash = "sha256-S3vzng6b0giB6Zceaxi62pQOEHysIR/vVQmswkEZ0/M=";
13 x86_64-darwin = fetchurl {
14 url = "https://saucelabs.com/downloads/sc-${version}-osx.zip";
15 hash = "sha256-6tJayqo+p7PMz8M651ikHz6tEjGjRIffOqQBchkpW5Q=";
17 aarch64-darwin = passthru.sources.x86_64-darwin;
21 src = passthru.sources.${stdenv.hostPlatform.system}
22 or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
24 nativeBuildInputs = [ unzip ];
26 patchPhase = lib.optionalString stdenv.isLinux ''
28 --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
29 --set-rpath "$out/lib:${lib.makeLibraryPath [zlib]}" \
41 description = "A secure tunneling app for executing tests securely when testing behind firewalls";
42 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
43 license = licenses.unfree;
44 homepage = "https://docs.saucelabs.com/reference/sauce-connect/";
45 maintainers = with maintainers; [ offline ];
46 platforms = builtins.attrNames passthru.sources;