Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

programs.browserpass: Do not touch nixpkgs.config #66448

Closed
wants to merge 1 commit into from

Conversation

bkchr
Copy link
Contributor

@bkchr bkchr commented Aug 10, 2019

If we set nixpkgs.config.firefox from within the script, it somehow
overrides settings that are done in a configuration.nix.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

If we set `nixpkgs.config.firefox` from within the script, it somehow
overrides settings that are done in a configuration.nix.
@infinisil
Copy link
Member

We can't just do that because then browserpass won't work anymore in firefox..

The problem is in the merge function of nixpkgs.config, which doesn't merge such assignments correctly..

configType = mkOptionType {
name = "nixpkgs-config";
description = "nixpkgs config";
check = x:
let traceXIfNot = c:
if c x then true
else lib.traceSeqN 1 x false;
in traceXIfNot isConfig;
merge = args: fold (def: mergeConfig def.value) {};
};

@bkchr
Copy link
Contributor Author

bkchr commented Aug 10, 2019

Ahh ty @infinisil. I assumed something like that but couldn't find the corresponding source code. Currently I just set enableBrowserpass by myself in configuration.nix.
Looking at the code, I don't see the bug at the first glance, can you fix this?

@infinisil
Copy link
Member

Yup, just did, see above PR

@bkchr
Copy link
Contributor Author

bkchr commented Aug 10, 2019

Nice ty!

@bkchr bkchr closed this Aug 10, 2019
@bkchr bkchr deleted the fix-browserpass branch August 10, 2019 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants