chromedriver: add dbus to libraries, correct LD_LIBRARY_PATH wrapping (#139723)

* chromedriver: add dbus to libraries

It is apparently required since version 94.

Fixes issue #139547

* chromedriver: remove extraneous LD_LIBRARY_PATH in wrapProgram

wrapProgram already prepends passed value to the specified environment
variable; no need to specify it explicitly.

* chromedriver: add a package test checking the reported version

* Update pkgs/development/tools/selenium/chromedriver/default.nix

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
ivan-timokhin 2021-09-29 00:39:14 +03:00 committed by GitHub
parent 0a3d9773b4
commit 56cf4e1d07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,8 @@
{ lib, stdenv, fetchurl, unzip, makeWrapper
, cairo, fontconfig, freetype, gdk-pixbuf, glib
, glibc, gtk2, libX11, nspr, nss, pango, gconf
, libxcb, libXi, libXrender, libXext
, libxcb, libXi, libXrender, libXext, dbus
, testVersion, chromedriver
}:
let
@ -27,6 +28,7 @@ let
gdk-pixbuf glib gtk2 gconf
libX11 nspr nss pango libXrender
gconf libxcb libXext libXi
dbus
];
in stdenv.mkDerivation rec {
@ -46,9 +48,11 @@ in stdenv.mkDerivation rec {
install -m755 -D chromedriver $out/bin/chromedriver
'' + lib.optionalString (!stdenv.isDarwin) ''
patchelf --set-interpreter ${glibc.out}/lib/ld-linux-x86-64.so.2 $out/bin/chromedriver
wrapProgram "$out/bin/chromedriver" --prefix LD_LIBRARY_PATH : "${libs}:\$LD_LIBRARY_PATH"
wrapProgram "$out/bin/chromedriver" --prefix LD_LIBRARY_PATH : "${libs}"
'';
passthru.tests.version = testVersion { package = chromedriver; };
meta = with lib; {
homepage = "https://chromedriver.chromium.org/";
description = "A WebDriver server for running Selenium tests on Chrome";