Skip to content

Drop flattenTreeSystem and use custom function for filtering packages#220

Merged
bors[bot] merged 2 commits intodivnix:corefrom
Pacman99:filterPackages
Mar 27, 2021
Merged

Drop flattenTreeSystem and use custom function for filtering packages#220
bors[bot] merged 2 commits intodivnix:corefrom
Pacman99:filterPackages

Conversation

@Pacman99
Copy link
Member

@Pacman99 Pacman99 commented Mar 26, 2021

I don't think we should flatten the system because if a user doesn't make a package a derivation in pkgs/default.nix we should trust that there is a reason for doing so. So instead this drops the flattenTreeSystem reference(and switches to flake-utils master branch) and replaces its usage with a custom function filterPackages. This function filter all packages that match three conditions;

  • is a derivation
  • not broken
  • system is supported

In that order as to not cause errors when trying to reference non-derivation meta attributes.

And then also just dump all packages into legacy packages, so everything else is still accessible. I was considering removing the packages that are already in the packages output in legacyPackages, but I don't think its necessary since nix looks to the packages output first.

@Pacman99 Pacman99 requested a review from nrdxp March 26, 2021 21:54
@Pacman99 Pacman99 marked this pull request as draft March 26, 2021 21:58
@Pacman99 Pacman99 marked this pull request as ready for review March 26, 2021 21:59
Copy link
Collaborator

@nrdxp nrdxp left a comment

Choose a reason for hiding this comment

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

The code changes are good, but for the sake of a prettier git log, the first line of a commit message should be kept under 50 chars, while subsequent lines should remain under 72 chars

Pacman99 added 2 commits March 26, 2021 16:55
@Pacman99
Copy link
Member Author

The code changes are good, but for the sake of a prettier git log, the first line of a commit message should be kept under 50 chars, while subsequent lines should remain under 72 chars

fixed! I really should stop using git commit -m

Copy link
Collaborator

@nrdxp nrdxp left a comment

Choose a reason for hiding this comment

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

It's all good. I've made the same mistake. Good work!
bors r+

@bors
Copy link
Contributor

bors bot commented Mar 27, 2021

Build succeeded:

@bors bors bot merged commit 5a3bae7 into divnix:core Mar 27, 2021
@blaggacao
Copy link
Contributor

What is this mainly motivated by (for the record)?

Is this motivated by the issues we had with flake checks & multiplatform?

@nrdxp
Copy link
Collaborator

nrdxp commented Mar 27, 2021

some context

Also flattenTreeSystem never got merged into flake-utils and was instead closed, so if the branch ever got deleted users might be pretty upset as well.

@Pacman99 Pacman99 deleted the filterPackages branch April 1, 2021 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants