Conversation
Collaborator
Author
|
@jtojnar WDYT of this? |
jtojnar
reviewed
Feb 8, 2026
Member
jtojnar
left a comment
There was a problem hiding this comment.
I am split on this.
On one hand, I like reducing dependencies and find the more localized transformations easier to reason about. On the other hand, we no longer share pkgs across the flake attributes.
There are some unrelated changes nested in.
| description = "Repository of Nix expressions for old PHP versions"; | ||
|
|
||
| inputs = { | ||
| nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; |
Member
There was a problem hiding this comment.
Why reorder them rather then keep them alphabetical?
| }; | ||
|
|
||
| outputs = | ||
| inputs: |
Member
There was a problem hiding this comment.
Why not keep the named arguments?
Comment on lines
+54
to
+56
| packages = forAllSystems ({ pkgs, ... }: phpPackages pkgs); | ||
|
|
||
| # For each supported platform, | ||
| utils.lib.eachDefaultSystem ( | ||
| system: | ||
| let | ||
| # Let’s merge the package set from Nixpkgs with our custom PHP versions. | ||
| pkgs = import nixpkgs.outPath { | ||
| config = { | ||
| allowUnfree = true; | ||
| }; | ||
| inherit system; | ||
| overlays = [ | ||
| self.overlays.default | ||
| ]; | ||
| }; | ||
| in | ||
| rec { | ||
| packages = { | ||
| inherit (pkgs) | ||
| php | ||
| php56 | ||
| php70 | ||
| php71 | ||
| php72 | ||
| php73 | ||
| php74 | ||
| php80 | ||
| php81 | ||
| php82 | ||
| php83 | ||
| php84 | ||
| ; | ||
| }; | ||
| checks = forAllSystems ( |
Member
There was a problem hiding this comment.
This will evaluate Nixpkgs twice when building both packages and checks. Not sure if that is bad enough to disqualify the nicer and clearer syntax.
| fn: | ||
| inputs.nixpkgs.lib.genAttrs inputs.nixpkgs.lib.systems.flakeExposed ( | ||
| system: | ||
| fn { |
Member
There was a problem hiding this comment.
GitHub confusingly highlights fn as keyword.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Let me know what you think.