2016-02-25 10:25:06 +00:00
|
|
|
{ stdenv, lib, fetchurl, zlib, unzip }:
|
2015-02-02 13:51:38 +00:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "sauce-connect-${version}";
|
2017-07-22 11:41:47 +01:00
|
|
|
version = "4.4.8";
|
2015-02-02 13:51:38 +00:00
|
|
|
|
|
|
|
src = fetchurl (
|
|
|
|
if stdenv.system == "x86_64-linux" then {
|
|
|
|
url = "https://saucelabs.com/downloads/sc-${version}-linux.tar.gz";
|
2017-07-22 11:41:47 +01:00
|
|
|
sha256 = "1y6jmz0kdaz1fq9sirwxznzw52if6ypd0dp9mk7dkpipy0bx7pz6";
|
2016-02-25 10:25:06 +00:00
|
|
|
} else if stdenv.system == "i686-linux" then {
|
2015-02-02 13:51:38 +00:00
|
|
|
url = "https://saucelabs.com/downloads/sc-${version}-linux32.tar.gz";
|
2017-07-22 11:41:47 +01:00
|
|
|
sha256 = "13nd2g1z4nvc3fa30xr3jnkqcy3fv4751s7ws4l93p7x6nc4aw1n";
|
2016-02-25 10:25:06 +00:00
|
|
|
} else {
|
|
|
|
url = "https://saucelabs.com/downloads/sc-${version}-osx.zip";
|
2017-07-22 11:41:47 +01:00
|
|
|
sha256 = "0f8kcx7qd6bqbd74y6n83lb52zban9k631qkv1vyddvs9pjsxmpg";
|
2015-02-02 13:51:38 +00:00
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2016-02-25 10:25:06 +00:00
|
|
|
buildInputs = [ unzip ];
|
|
|
|
|
2016-09-17 18:48:23 +01:00
|
|
|
patchPhase = stdenv.lib.optionalString stdenv.isLinux ''
|
2015-02-02 13:51:38 +00:00
|
|
|
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";
|
2015-05-28 18:20:29 +01:00
|
|
|
license = licenses.unfree;
|
2015-02-02 13:51:38 +00:00
|
|
|
homepage = https://docs.saucelabs.com/reference/sauce-connect/;
|
|
|
|
maintainers = with maintainers; [offline];
|
2016-02-25 10:25:06 +00:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2015-02-02 13:51:38 +00:00
|
|
|
};
|
|
|
|
}
|