@@ -1,21 +1,27 @@
1−{ stdenv, lib, fetchurl, zlib }:
1+{ stdenv, lib, fetchurl, zlib, unzip }:
22
33with lib;
44
55stdenv.mkDerivation rec {
66 name = "sauce-connect-${version}";
7− version = "4.3.6";
7+ version = "4.3.13";
88
99 src = fetchurl (
1010 if stdenv.system == "x86_64-linux" then {
1111 url = "https://saucelabs.com/downloads/sc-${version}-linux.tar.gz";
1212 sha1 = "0d7d2dc12766ac137e62a3e4dad3025b590f9782";
13− } else {
13+ } else if stdenv.system == "i686-linux" then {
1414 url = "https://saucelabs.com/downloads/sc-${version}-linux32.tar.gz";
1515 sha1 = "ee2c3002eae3b29df801a2ac1db77bb5f1c97bcc";
16+ } else {
17+ url = "https://saucelabs.com/downloads/sc-${version}-osx.zip";
18+ sha1 = "ihr4ynnyi464pafgqyl5xkhfi13yi76j";
1619 }
1720 );
1821
22+ buildInputs = [ unzip ];
23+ phases = "unpackPhase installPhase" + (if stdenv.system == "x86_64-darwin" then "" else "patchPhase");
24+
1925 patchPhase = ''
2026 patchelf \
2127 --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
@@ -35,6 +41,6 @@ stdenv.mkDerivation rec {
3541 license = licenses.unfree;
3642 homepage = https://docs.saucelabs.com/reference/sauce-connect/;
3743 maintainers = with maintainers; [offline];
38− platforms = platforms.linux;
44+ platforms = platforms.linux ++ platforms.darwin;
3945 };
4046}