nixpkgs/pkgs/development/tools/sauce-connect/default.nix

46 lines
1.3 KiB
Nix
Raw Normal View History

2016-02-25 10:25:06 +00:00
{ stdenv, lib, fetchurl, zlib, unzip }:
with lib;
stdenv.mkDerivation rec {
name = "sauce-connect-${version}";
2016-09-16 16:21:42 +00:00
version = "4.4.0";
src = fetchurl (
if stdenv.system == "x86_64-linux" then {
url = "https://saucelabs.com/downloads/sc-${version}-linux.tar.gz";
2016-09-16 16:21:42 +00:00
sha256 = "19zgnw0qn5f775p581mq5ry086rhcnnhqc6x82hzmwfysbsyl7xs";
2016-02-25 10:25:06 +00:00
} else if stdenv.system == "i686-linux" then {
url = "https://saucelabs.com/downloads/sc-${version}-linux32.tar.gz";
2016-09-16 16:21:42 +00:00
sha256 = "1m4nf1yidwkmlwald0ycwzvnsp5p93nc4bs1xh67phw0b2db99x9";
2016-02-25 10:25:06 +00:00
} else {
url = "https://saucelabs.com/downloads/sc-${version}-osx.zip";
2016-09-16 16:21:42 +00:00
sha256 = "1bpdpwqa9sw2n7vw2g8q4c1mzgh8wgwn4p7sbryc2ki90yz8ibga";
}
);
2016-02-25 10:25:06 +00:00
buildInputs = [ unzip ];
patchPhase = stdenv.lib.optionalString stdenv.isLinux ''
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";
license = licenses.unfree;
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;
};
}