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}";
|
2018-03-07 17:06:08 +01:00
|
|
|
version = "4.4.12";
|
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";
|
2018-03-07 17:06:08 +01:00
|
|
|
sha256 = "1yqvx64bgiq27hdhwkzgmzyib8pbjn1idpq6783srxq64asf6iyw";
|
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";
|
2018-03-07 17:06:08 +01:00
|
|
|
sha256 = "02kib56lv4lhwkj5r15484lvvbyjvf9ydi5vccsmxgsxrzmddnl6";
|
2016-02-25 11:25:06 +01:00
|
|
|
} else {
|
|
|
|
url = "https://saucelabs.com/downloads/sc-${version}-osx.zip";
|
2018-03-07 17:06:08 +01:00
|
|
|
sha256 = "1gqsbw9f6nachk3c86knbqq417smqyf19mi63fmrfxrbxzy2fkv2";
|
2015-02-02 14:51:38 +01:00
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2016-02-25 11:25:06 +01:00
|
|
|
buildInputs = [ unzip ];
|
|
|
|
|
2016-09-17 19:48:23 +02:00
|
|
|
patchPhase = stdenv.lib.optionalString stdenv.isLinux ''
|
2015-02-02 14:51:38 +01: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 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
|
|
|
};
|
|
|
|
}
|