summary refs log tree commit diff
path: root/pkgs/development/tools/geckodriver/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/geckodriver/default.nix')
-rw-r--r--pkgs/development/tools/geckodriver/default.nix29
1 files changed, 16 insertions, 13 deletions
diff --git a/pkgs/development/tools/geckodriver/default.nix b/pkgs/development/tools/geckodriver/default.nix
index 68d1a74b277..9f0de971d1b 100644
--- a/pkgs/development/tools/geckodriver/default.nix
+++ b/pkgs/development/tools/geckodriver/default.nix
@@ -1,26 +1,29 @@
 { lib
-, fetchFromGitHub
+, fetchzip
 , rustPlatform
 , stdenv
 , darwin
 }:
 
-with rustPlatform; 
-
-buildRustPackage rec {
-  version = "0.22.0";
+rustPlatform.buildRustPackage {
+  version = "0.26.0";
   pname = "geckodriver";
+  sourceRoot = "source/testing/geckodriver";
 
-  src = fetchFromGitHub {
-    owner = "mozilla";
-    repo = "geckodriver";
-    rev = "v${version}";
-    sha256 = "12m95lfqwdxs2m5kjh3yrpm9w2li5m8n3fw46a2nkxyfw6c94l4b";
-  };
+  # Source revisions are noted alongside the binary releases:
+  # https://github.com/mozilla/geckodriver/releases
+  src = (fetchzip {
+    url = "https://hg.mozilla.org/mozilla-central/archive/e9783a644016aa9b317887076618425586730d73.zip/testing";
+    sha256 = "0m86hqyq1jrr49jkc8mnlmx4bdq281hyxhcrrzacyv20nlqwvd8v";
+  }).overrideAttrs (_: {
+    # normally guessed by the url's file extension, force it to unpack properly
+    unpackCmd = "unzip $curSrc";
+  });
 
-  buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
+  cargoPatches = [ ./cargo-lock.patch ];
+  cargoSha256 = "07w5lmvm5w6id0qikcs968n0c69bb6fav63l66bskxcjva67d6dy";
 
-  cargoSha256 = "1pwg35kgn5z2zrlj1dwcbbdmkgmnvfxpxv4klzsxxg4m9xr1pfy4";
+  buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
 
   meta = with lib; {
     description = "Proxy for using W3C WebDriver-compatible clients to interact with Gecko-based browsers";