in NixOS 22.11 the selenium python package is broken.
There is already an issue pythonPackages.selenium: FileNotFoundError: [Errno 2] No such file or directory, 'getAttribute.js' · Issue #181035 · NixOS/nixpkgs · GitHub
I want to fix it locally in my shell.nix by overriding postInstall.
{ pkgs ? import <nixpkgs> { } }:
let
python-with-my-packages = (let
python = let
packageOverrides = self: super: {
selenium = super.selenium.overridePythonAttrs (old: rec {
postInstall = ''
install -Dm 755 ../rb/lib/selenium/webdriver/atoms/getAttribute.js $out/${self.sitePackages}/selenium/webdriver/remote/getAttribute.js
install -Dm 755 ../rb/lib/selenium/webdriver/atoms/isDisplayed.js $out/${self.sitePackages}/selenium/webdriver/remote/isDisplayed.js
'';
});
};
in pkgs.python3.override {
inherit packageOverrides;
self = python;
};
in python.withPackages (ps: [ ps.selenium ])).passthru.pkgs.selenium;
in pkgs.mkShell {
buildInputs = [
python-with-my-packages
pkgs.geckodriver
];
}
But is says, error: attribute ‘sitePackages’ missing. Where can I find this attribute, and how can learn how to find this attribute?