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

Small refactoring in coqPackages #49456

Merged
merged 3 commits into from Nov 4, 2018
Merged

Conversation

vbgl
Copy link
Contributor

@vbgl vbgl commented Oct 30, 2018

Motivation for this change

Make it easier to override Coq packages.

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 nox --run "nox-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)
  • Fits CONTRIBUTING.md.

Zimmi48 added a commit to Zimmi48/coq that referenced this pull request Nov 2, 2018
Closes coq#8227 by solving remaining differences.

Sets doNotFilter in anticipation of NixOS/nixpkgs#49456.
Zimmi48 added a commit to Zimmi48/coq that referenced this pull request Nov 2, 2018
Closes coq#8227 by solving remaining differences.

Sets doNotFilter in anticipation of NixOS/nixpkgs#49456.
Zimmi48 added a commit to Zimmi48/coq that referenced this pull request Nov 2, 2018
Closes coq#8227 by solving remaining differences.

Sets doNotFilter in anticipation of NixOS/nixpkgs#49456.
@@ -54,7 +54,8 @@ in rec {

mkCoqPackages = coq:
let self = mkCoqPackages' self coq; in
filterCoqPackages coq self;
if coq.doNotFilter or false then self
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if coq.doNotFilter or false then self
if coq.doNotFilter then self

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright. Let me add some documentation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right! It's the a.b or c syntax. I can't believe I fell for that.

Do we really need the negated name? Negated names require unnecessary extra thinking. What about "setting doFilter = false" which has a default of true?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe Théo has an opinion. Ping @Zimmi48 .

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I did not know about the syntax, will use ;-)
Regarding doFilter = false vs doNotFilter = true, it seems that the implicit convention in nixpkgs (https://nixos.org/nixpkgs/manual/#sec-stdenv-phases) is that when something is off by default, it is enabled with doStuff = true but when something is on by default, it is disabled dontStuff = true. Thus, it suggests to use dontFilter here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let’s go with dontFilter.

@vbgl vbgl force-pushed the coq-packages-no-filter branch 2 times, most recently from 32bf813 to 9014c5f Compare November 4, 2018 09:13
Zimmi48 added a commit to Zimmi48/coq that referenced this pull request Nov 4, 2018
Closes coq#8227 by solving remaining differences.

Sets dontFilter in anticipation of NixOS/nixpkgs#49456.
@vbgl vbgl merged commit e338d80 into NixOS:master Nov 4, 2018
@vbgl vbgl deleted the coq-packages-no-filter branch November 4, 2018 20:49
Zimmi48 added a commit to Zimmi48/coq that referenced this pull request Nov 5, 2018
Closes coq#8227 by solving remaining differences.

Sets dontFilter in anticipation of NixOS/nixpkgs#49456.
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

4 participants