about summary refs log tree commit diff
path: root/pkgs/development/tools/geckodriver/default.nix
blob: beb55c21a50418d990dfd2699b4d9de66da8ca12 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ lib
, fetchzip
, rustPlatform
, stdenv
, Security
, libiconv
}:

rustPlatform.buildRustPackage {
  version = "0.30.0";
  pname = "geckodriver";
  sourceRoot = "source/testing/geckodriver";

  # Source revisions are noted alongside the binary releases:
  # https://github.com/mozilla/geckodriver/releases
  src = (fetchzip {
    url = "https://hg.mozilla.org/mozilla-central/archive/d372710b98a6ce5d1b2a9dffd53a879091c5c148.zip/testing";
    sha256 = "0d27h9c8vw4rs9c2l9wms4lc931nbp2g5hacsh24zhc9y3v454i6";
  }).overrideAttrs (_: {
    # normally guessed by the url's file extension, force it to unpack properly
    unpackCmd = "unzip $curSrc";
  });

  cargoPatches = [ ./cargo-lock.patch ];
  cargoSha256 = "08zcrhrmxh3c3iwd7kbnr19lfisikb779i2r7ir7b1i1ynmi4v6r";

  buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];

  meta = with lib; {
    description = "Proxy for using W3C WebDriver-compatible clients to interact with Gecko-based browsers";
    homepage = "https://github.com/mozilla/geckodriver";
    license = licenses.mpl20;
    maintainers = with maintainers; [ jraygauthier ];
  };
}