wrapFirefox: make makeWrapperArgs overridable#374270
Conversation
Provide a way to override makeWrapperArgs
|
|
|
makeWrapperArgs overridablemakeWrapperArgs overridable
|
|
||
| ] ++ lib.optionals (!hasMozSystemDirPatch) (lib.concatMap (ext: [ | ||
| "--run" | ||
| ''ln -sfLt ''${MOZ_HOME:-~/.mozilla}/native-messaging-hosts ${ext}/lib/mozilla/native-messaging-hosts/*'' |
There was a problem hiding this comment.
This and the --run above does not correctly escape/quote the command to run. If there are any native messaging hosts, the build of the wrapper fails:
error: builder for '/nix/store/dk194z1a1q94z56wir1y45gg1q09h5ch-librewolf-134.0.1-1.drv' failed with exit code 1;
last 9 log lines:
> structuredAttrs is enabled
>
> Builder called die: makeWrapper doesn't understand the arg -p
> Backtrace:
> 185 makeShellWrapper /nix/store/9cdcy8k4zp8zm03kpqf49xghfk1c451l-make-shell-wrapper-hook/nix-support/setup-hook
> 37 makeWrapper /nix/store/9cdcy8k4zp8zm03kpqf49xghfk1c451l-make-shell-wrapper-hook/nix-support/setup-hook
> 1818 genericBuild /nix/store/d0gfdcag8bxzvg7ww4s7px4lf8sxisyx-stdenv-linux/setup
> 4 main /nix/store/v6x3cs394jgqfbi0a42pam708flxaphh-default-builder.sh
>
For full logs, run 'nix log /nix/store/dk194z1a1q94z56wir1y45gg1q09h5ch-librewolf-134.0.1-1.drv'.
There was a problem hiding this comment.
I located the error. It's not the specification of the makeWrapperArgs elements (which I checked carefully to ensure evaluation equivalence), but I forgot to quote the Bash array ${makeWrapperArgs[@]}. Sorry for the trouble, and thank you for telling me!
|
@ShamrockLee Can you resolve this quickly? If not we should probably revert for now. |
|
@mweinelt I'll look into it right away. |
|
|
|
Pick this change on top of nixos-unstable to test. |
|
The wrapper should fail the same with any firefox build or fork. |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
This PR allows changing the wrapper's
makeWrapperArgsviaoverrideAttrsutilizing__structuredAttrs = trueandmkDerivation's fixed-point arguments support.Example use case:
I preserved the overriding behaviour of the
libsandgtk_modulesfor compatibility purposes.Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.