mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 08:43:06 +00:00
d31e17fa56
Latest version on Linux is actually 4.9.2, but latest on Mac is 4.9.1, so only updating to 4.9.1 for consistency between the two. Also added passthru.updateScript to keep this package up to date in the future, with associated refactoring to make that possible.
49 lines
1.4 KiB
Nix
49 lines
1.4 KiB
Nix
{ stdenv, lib, fetchurl, zlib, unzip }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "sauce-connect";
|
|
version = "4.9.1";
|
|
|
|
passthru = {
|
|
sources = {
|
|
x86_64-linux = fetchurl {
|
|
url = "https://saucelabs.com/downloads/sc-${version}-linux.tar.gz";
|
|
hash = "sha256-S3vzng6b0giB6Zceaxi62pQOEHysIR/vVQmswkEZ0/M=";
|
|
};
|
|
x86_64-darwin = fetchurl {
|
|
url = "https://saucelabs.com/downloads/sc-${version}-osx.zip";
|
|
hash = "sha256-6tJayqo+p7PMz8M651ikHz6tEjGjRIffOqQBchkpW5Q=";
|
|
};
|
|
aarch64-darwin = passthru.sources.x86_64-darwin;
|
|
};
|
|
};
|
|
|
|
src = passthru.sources.${stdenv.hostPlatform.system}
|
|
or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
|
|
|
nativeBuildInputs = [ unzip ];
|
|
|
|
patchPhase = lib.optionalString stdenv.isLinux ''
|
|
patchelf \
|
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
|
--set-rpath "$out/lib:${lib.makeLibraryPath [zlib]}" \
|
|
bin/sc
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out
|
|
cp -r * $out
|
|
'';
|
|
|
|
dontStrip = true;
|
|
|
|
meta = with lib; {
|
|
description = "A secure tunneling app for executing tests securely when testing behind firewalls";
|
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
|
license = licenses.unfree;
|
|
homepage = "https://docs.saucelabs.com/reference/sauce-connect/";
|
|
maintainers = with maintainers; [ offline ];
|
|
platforms = builtins.attrNames passthru.sources;
|
|
};
|
|
}
|