2016-02-25 11:25:06 +01:00
|
|
|
{ stdenv, lib, fetchurl, zlib, unzip }:
|
2015-02-02 14:51:38 +01:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "sauce-connect-${version}";
|
2016-03-18 18:30:10 +01:00
|
|
|
version = "4.3.14";
|
2015-02-02 14:51:38 +01:00
|
|
|
|
|
|
|
src = fetchurl (
|
|
|
|
if stdenv.system == "x86_64-linux" then {
|
|
|
|
url = "https://saucelabs.com/downloads/sc-${version}-linux.tar.gz";
|
2016-03-18 18:30:10 +01:00
|
|
|
sha256 = "0j900dijhq8rpjaf2hgqvz5gy3dgal6l1f7q6353m2v14jbwb786";
|
2016-02-25 11:25:06 +01:00
|
|
|
} else if stdenv.system == "i686-linux" then {
|
2015-02-02 14:51:38 +01:00
|
|
|
url = "https://saucelabs.com/downloads/sc-${version}-linux32.tar.gz";
|
2016-03-18 18:30:10 +01:00
|
|
|
sha256 = "0nkgd1pyh21p0yg1zs0nzki0w4wsl1yy964lbz6mf6nrsjzqg54k";
|
2016-02-25 11:25:06 +01:00
|
|
|
} else {
|
|
|
|
url = "https://saucelabs.com/downloads/sc-${version}-osx.zip";
|
2016-03-18 18:30:10 +01:00
|
|
|
sha256 = "1mcvxvqvfikkn19mjwws55x2abjp09jvjjg6b15x8w075bd9ql8g";
|
2015-02-02 14:51:38 +01:00
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2016-02-25 11:25:06 +01:00
|
|
|
buildInputs = [ unzip ];
|
2016-03-01 20:42:09 +01:00
|
|
|
phases = "unpackPhase installPhase " + (if stdenv.system == "x86_64-darwin" then "" else "patchPhase");
|
2016-02-25 11:25:06 +01:00
|
|
|
|
2015-02-02 14:51:38 +01:00
|
|
|
patchPhase = ''
|
|
|
|
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 19:20:29 +02:00
|
|
|
license = licenses.unfree;
|
2015-02-02 14:51:38 +01:00
|
|
|
homepage = https://docs.saucelabs.com/reference/sauce-connect/;
|
|
|
|
maintainers = with maintainers; [offline];
|
2016-02-25 11:25:06 +01:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2015-02-02 14:51:38 +01:00
|
|
|
};
|
|
|
|
}
|