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

47 lines
1.4 KiB
Nix
Raw Normal View History

2016-02-25 11:25:06 +01:00
{ stdenv, lib, fetchurl, zlib, unzip }:
with lib;
stdenv.mkDerivation rec {
name = "sauce-connect-${version}";
2016-03-18 18:30:10 +01:00
version = "4.3.14";
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 {
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";
}
);
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
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";
license = licenses.unfree;
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;
};
}