2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, lib, fetchurl, zlib, unzip }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "sauce-connect";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "4.9.1";
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
sources = {
|
|
|
|
x86_64-linux = fetchurl {
|
|
|
|
url = "https://saucelabs.com/downloads/sc-${version}-linux.tar.gz";
|
|
|
|
hash = "sha256-S3vzng6b0giB6Zceaxi62pQOEHysIR/vVQmswkEZ0/M=";
|
|
|
|
};
|
|
|
|
x86_64-darwin = fetchurl {
|
|
|
|
url = "https://saucelabs.com/downloads/sc-${version}-osx.zip";
|
|
|
|
hash = "sha256-6tJayqo+p7PMz8M651ikHz6tEjGjRIffOqQBchkpW5Q=";
|
|
|
|
};
|
|
|
|
aarch64-darwin = passthru.sources.x86_64-darwin;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
src = passthru.sources.${stdenv.hostPlatform.system}
|
|
|
|
or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-19 17:17:44 +00:00
|
|
|
nativeBuildInputs = [ unzip ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
patchPhase = lib.optionalString stdenv.hostPlatform.isLinux ''
|
2020-04-24 23:36:52 +00:00
|
|
|
patchelf \
|
|
|
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
2023-02-02 18:25:31 +00:00
|
|
|
--set-rpath "$out/lib:${lib.makeLibraryPath [zlib]}" \
|
2020-04-24 23:36:52 +00:00
|
|
|
bin/sc
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -r * $out
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontStrip = true;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Secure tunneling app for executing tests securely when testing behind firewalls";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.unfree;
|
|
|
|
homepage = "https://docs.saucelabs.com/reference/sauce-connect/";
|
2024-01-02 11:29:13 +00:00
|
|
|
maintainers = with maintainers; [ offline ];
|
|
|
|
platforms = builtins.attrNames passthru.sources;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|