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-06-23 11:30:07 +02:00
|
|
|
version = "4.3.16";
|
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-06-23 11:30:07 +02:00
|
|
|
sha256 = "0i4nvb1yd9qnbgbfc8wbl7ghpmba2jr98hj4y4j4sbjfk65by3xw";
|
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-06-23 11:30:07 +02:00
|
|
|
sha256 = "1w9b1584kh1n4fw0wxbyslxp6w09if53fv4p9zz7vn4smm79ndfz";
|
2016-02-25 11:25:06 +01:00
|
|
|
} else {
|
|
|
|
url = "https://saucelabs.com/downloads/sc-${version}-osx.zip";
|
2016-06-23 11:30:07 +02:00
|
|
|
sha256 = "1vhz2j30p285blspg7prr9bsah6f922p0mv7mhmk6xzgf6fgn764";
|
2015-02-02 14:51:38 +01:00
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2016-02-25 11:25:06 +01:00
|
|
|
buildInputs = [ unzip ];
|
2016-06-23 12:10:44 +02:00
|
|
|
phases = [ "unpackPhase" ]
|
|
|
|
++ (lib.optionals (stdenv.system != "x86_64-darwin") [ "patchPhase" ])
|
|
|
|
++ [ "installPhase " ];
|
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
|
|
|
};
|
|
|
|
}
|