Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 33b99efb96d4
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6aea53c3ce3b
Choose a head ref
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Nov 27, 2020

  1. chromedriver: Switch to Chromium's upstream-info.json (#105054)

    This enables automatic updates and fixes #85629.
    primeos authored Nov 27, 2020

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    andir Andreas Rammhold
    Copy the full SHA
    6aea53c View commit details
16 changes: 16 additions & 0 deletions pkgs/applications/networking/browsers/chromium/update.py
Original file line number Diff line number Diff line change
@@ -38,6 +38,20 @@ def get_file_revision(revision, file_path):
with urlopen(url) as http_response:
return http_response.read()

def get_matching_chromedriver(version):
# See https://chromedriver.chromium.org/downloads/version-selection
build = re.sub('.[0-9]+$', '', version)
chromedriver_version_url = f'https://chromedriver.storage.googleapis.com/LATEST_RELEASE_{build}'
with urlopen(chromedriver_version_url) as http_response:
chromedriver_version = http_response.read().decode()
def get_chromedriver_url(system):
return f'https://chromedriver.storage.googleapis.com/{chromedriver_version}/chromedriver_{system}.zip'
return {
'version': chromedriver_version,
'sha256_linux': nix_prefetch_url(get_chromedriver_url('linux64')),
'sha256_darwin': nix_prefetch_url(get_chromedriver_url('mac64'))
}

def get_channel_dependencies(channel):
deps = get_file_revision(channel['version'], 'DEPS')
gn_pattern = b"'gn_version': 'git_revision:([0-9a-f]{40})'"
@@ -85,6 +99,8 @@ def get_channel_dependencies(channel):
continue

channel['deps'] = get_channel_dependencies(channel)
if channel_name == 'stable':
channel['chromedriver'] = get_matching_chromedriver(channel['version'])

channels[channel_name] = channel

Original file line number Diff line number Diff line change
@@ -10,6 +10,11 @@
"rev": "e002e68a48d1c82648eadde2f6aafa20d08c36f2",
"sha256": "0x4c7amxwzxs39grqs3dnnz0531mpf1p75niq7zhinyfqm86i4dk"
}
},
"chromedriver": {
"version": "87.0.4280.20",
"sha256_linux": "1cpk7mb32z3a7c7cbaaxskpv91il3i8kgsdp2q8zw9w762kql953",
"sha256_darwin": "06mx2yk6xy46azvkbyvhqm11prxbh67pfi50fcwxb0zqllbq7scr"
}
},
"beta": {
29 changes: 20 additions & 9 deletions pkgs/development/tools/selenium/chromedriver/default.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
{ stdenv, fetchurl, cairo, fontconfig, freetype, gdk-pixbuf, glib
, glibc, gtk2, libX11, makeWrapper, nspr, nss, pango, unzip, gconf
{ stdenv, fetchurl, unzip, makeWrapper
, cairo, fontconfig, freetype, gdk-pixbuf, glib
, glibc, gtk2, libX11, nspr, nss, pango, gconf
, libxcb, libXi, libXrender, libXext
}:

let
upstream-info = (stdenv.lib.importJSON ../../../../applications/networking/browsers/chromium/upstream-info.json).stable.chromedriver;
allSpecs = {
x86_64-linux = {
system = "linux64";
sha256 = "1cpk7mb32z3a7c7cbaaxskpv91il3i8kgsdp2q8zw9w762kql953";
sha256 = upstream-info.sha256_linux;
};

x86_64-darwin = {
system = "mac64";
sha256 = "06mx2yk6xy46azvkbyvhqm11prxbh67pfi50fcwxb0zqllbq7scr";
sha256 = upstream-info.sha256_darwin;
};
};

@@ -25,10 +28,10 @@ let
libX11 nspr nss pango libXrender
gconf libxcb libXext libXi
];
in
stdenv.mkDerivation rec {

in stdenv.mkDerivation rec {
pname = "chromedriver";
version = "87.0.4280.20";
version = upstream-info.version;

src = fetchurl {
url = "https://chromedriver.storage.googleapis.com/${version}/chromedriver_${spec.system}.zip";
@@ -47,10 +50,18 @@ stdenv.mkDerivation rec {
'';

meta = with stdenv.lib; {
homepage = "https://sites.google.com/a/chromium.org/chromedriver";
homepage = "https://chromedriver.chromium.org/";
description = "A WebDriver server for running Selenium tests on Chrome";
longDescription = ''
WebDriver is an open source tool for automated testing of webapps across
many browsers. It provides capabilities for navigating to web pages, user
input, JavaScript execution, and more. ChromeDriver is a standalone
server that implements the W3C WebDriver standard.
'';
license = licenses.bsd3;
maintainers = [ maintainers.goibhniu maintainers.marsam ];
maintainers = with maintainers; [ goibhniu marsam primeos ];
# Note from primeos: By updating Chromium I also update Google Chrome and
# ChromeDriver.
platforms = attrNames allSpecs;
};
}