NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.58k stars 13.74k forks source link

firefoxpwa: missing support for custom runtimes #344442

Open brckd opened 5 days ago

brckd commented 5 days ago

Describe the bug

A clear and concise description of what the bug is.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install pkgs.firefoxpwa.
  2. Symlink ~/.local/share/firefoxpwa/runtime to librewolf
  3. Install a PWA like firefoxpwa site install https://regex101.com/static/assets/manifest.webmanifest
  4. Run the PWA
  5. The PWA is run using Firefox, not LibreWolf.

Expected behavior

I would like to use librewolf as runtime instead. There are two ways to accomplish htis.

  1. Make it possible to override the binary in the following line. https://github.com/NixOS/nixpkgs/blob/babc25a577c3310cce57c72d5bed70f4c3c3843a/pkgs/by-name/fi/firefoxpwa/package.nix#L87
  2. Remove the immutable runtime alltogether and instead source from ~/.local/share/firefoxpwa/runtime

Additional context

Discussion about packaging and immutable runtime: https://github.com/filips123/PWAsForFirefox/issues/204-

librewolf-unwrapped/lib/librewolf exposes librewolf-bin instead of firefox-bin. Depending on how PWAsForFirefox sources the immutable runtime binary, it may need to be symlinked as firefox-bin.

Notify maintainers

@adamcstephens @camillemndn @pasqui23

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.52, NixOS, 24.11 (Vicuna), 24.11.20240921.9357f4f`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.7`
 - nixpkgs: `/nix/store/y6205wq8hxvpqvl8l9d1n9xah01kg0lq-source`

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

adamcstephens commented 5 days ago

I have no plan to extend support beyond the standard firefox package. At most I'll review a PR to make sure it doesn't break firefox, but otherwise someone else will need to do the work.