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 {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "sauce-connect";
|
2019-08-06 02:51:49 +00:00
|
|
|
version = "4.5.4";
|
2015-02-02 13:51:38 +00:00
|
|
|
|
|
|
|
src = fetchurl (
|
2018-08-20 19:11:29 +00:00
|
|
|
if stdenv.hostPlatform.system == "x86_64-linux" then {
|
2015-02-02 13:51:38 +00:00
|
|
|
url = "https://saucelabs.com/downloads/sc-${version}-linux.tar.gz";
|
2019-08-06 02:51:49 +00:00
|
|
|
sha256 = "1w8fw47q4bzpk5jfagmc0cbp69jdd6jcv2xl1gx91cbp7xd8mcbf";
|
2018-08-20 19:11:29 +00:00
|
|
|
} else if stdenv.hostPlatform.system == "i686-linux" then {
|
2015-02-02 13:51:38 +00:00
|
|
|
url = "https://saucelabs.com/downloads/sc-${version}-linux32.tar.gz";
|
2018-09-01 13:36:00 +00:00
|
|
|
sha256 = "1h9n1mzmrmlrbd0921b0sgg7m8z0w71pdb5sif6h1b9f97cp353x";
|
2016-02-25 10:25:06 +00:00
|
|
|
} else {
|
|
|
|
url = "https://saucelabs.com/downloads/sc-${version}-osx.zip";
|
2018-09-01 13:36:00 +00:00
|
|
|
sha256 = "0rkyd402f1n92ad3w1460j1a4m46b29nandv4z6wvg2pasyyf2lj";
|
2015-02-02 13:51:38 +00:00
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2016-02-25 10:25:06 +00:00
|
|
|
buildInputs = [ unzip ];
|
|
|
|
|
2016-09-17 17:48:23 +00: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 17:20:29 +00: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
|
|
|
};
|
|
|
|
}
|