45 lines
1.3 KiB
Nix
45 lines
1.3 KiB
Nix
{ stdenv, lib, fetchurl, zlib, unzip }:
|
|
|
|
with lib;
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "sauce-connect-${version}";
|
|
version = "4.4.2";
|
|
|
|
src = fetchurl (
|
|
if stdenv.system == "x86_64-linux" then {
|
|
url = "https://saucelabs.com/downloads/sc-${version}-linux.tar.gz";
|
|
sha256 = "0n3c9ihrxqy4y4mzgchggqa2v7c0y9jw2yqnjdd7cf4nd24fixbq";
|
|
} else if stdenv.system == "i686-linux" then {
|
|
url = "https://saucelabs.com/downloads/sc-${version}-linux32.tar.gz";
|
|
sha256 = "1pdvx4apd4x1bsyl8lhzlpv3jp3xzyv7yrsl3wjrql17p2asaba6";
|
|
} else {
|
|
url = "https://saucelabs.com/downloads/sc-${version}-osx.zip";
|
|
sha256 = "03kn7i0a6mpxfc6mz9h560wadhmw5qxn15is7cl9kgkz5j874xlz";
|
|
}
|
|
);
|
|
|
|
buildInputs = [ unzip ];
|
|
|
|
patchPhase = stdenv.lib.optionalString stdenv.isLinux ''
|
|
patchelf \
|
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
|
--set-rpath "$out/lib:${makeLibraryPath [zlib]}" \
|
|
bin/sc
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out
|
|
cp -r * $out
|
|
'';
|
|
|
|
dontStrip = true;
|
|
|
|
meta = {
|
|
description = "A secure tunneling app for executing tests securely when testing behind firewalls";
|
|
license = licenses.unfree;
|
|
homepage = https://docs.saucelabs.com/reference/sauce-connect/;
|
|
maintainers = with maintainers; [offline];
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
};
|
|
}
|