Skip to content

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

Closed
bkchr wants to merge 1 commit intoNixOS:masterfrom
bkchr:fix-browserpass
Closed

programs.browserpass: Do not touch nixpkgs.config#66448
bkchr wants to merge 1 commit intoNixOS:masterfrom
bkchr:fix-browserpass

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.
@ofborg ofborg bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Aug 10, 2019
@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) {};
};

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Aug 10, 2019
@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

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants