NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.29k stars 13.54k forks source link

Package request: robotframework-browserlibrary #292321

Open ptman opened 6 months ago

ptman commented 6 months ago

Project description

Browser automation using playwright instead of selenium (robotframework-seleniumlibrary).

Metadata


Add a :+1: reaction to issues you find important.

ptman commented 6 months ago

I tried packaging this myself, but didn't get it working: https://gist.github.com/ptman/da9c1fcb5d3406bda0211bbc48c336b5

iwanb commented 6 months ago

I tried packaging this myself, but didn't get it working: https://gist.github.com/ptman/da9c1fcb5d3406bda0211bbc48c336b5

wrapt is too old on 23.11, you could try against nixpkgs unstable instead. But another issue you'll get is that the project depends on hardcoded versions of protobuf and grpcio: https://github.com/MarketSquare/robotframework-browser/blob/6415dc79623228495f7120a17960b9994e1f6c63/Browser/requirements.txt#L1

You'd have to pass those exact versions, or patch this out, or see with upstream if they could remove that from setup.py and hardcode it only in their build instead. (Could be there's another reason for the hardcoding though.)

To really manage things through nix, you'd have to also handle whatever is happening in their rfbrowser init script (installing the nodejs dependencies and pulling browsers I believe), and replace it with nix dependencies instead. That will probably be tricky to do.

ptman commented 6 months ago

I did try on unstable, with different packages being the problem. I think playwright itself is already packaged, so the browsers shouldn't be the problem. I asked for help on matrix, but the python discussion room was unable to help. I feel like I've exhausted the options available to me. I have written some nix and packages, but python seems to be too much of a jungle to overcome.

Maybe there's some cleanish way to just sidestep this and use a venv with light integration to nix?