Skip to content

nixVersions.nix_2_26: init at 2.26.1#375856

Merged
roberth merged 10 commits intomasterfrom
nix-2.26.0
Feb 9, 2025
Merged

nixVersions.nix_2_26: init at 2.26.1#375856
roberth merged 10 commits intomasterfrom
nix-2.26.0

Conversation

@roberth
Copy link
Member

@roberth roberth commented Jan 22, 2025

This is the first Nixpkgs build of Nix that uses meson and uses the componentized build.

Related

Future versions may use a similar method of packaging (copying files mostly as-is), or we could "make it our own" here in Nixpkgs and support multiple versions using conditionals, etc.
This initial version probably leaves one or two things to be desired, but let's get the ball rolling first.

TODO

  • 2.26.1

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Context:


Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jan 22, 2025
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nix-2-26-released/59211/2

@roberth roberth marked this pull request as draft January 24, 2025 19:46
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nix-2-26-released/59211/11

};

# TODO Hack until https://github.com/NixOS/nixpkgs/issues/45462 is fixed.
boost =
Copy link
Member

Choose a reason for hiding this comment

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

Just a heads up. We didn't use to have this override in nixpkgs. Question is if we want this now?

Copy link
Member

Choose a reason for hiding this comment

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

Afaik this would only save us downloading icu.

}).overrideAttrs
(old: {
# Need to remove `--with-*` to use `--with-libraries=...`
buildPhase = lib.replaceStrings [ "--without-python" ] [ "" ] old.buildPhase;
Copy link
Member

Choose a reason for hiding this comment

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

boost seems to not have python enabled by default. So we can drop the overrideAttrs here and in the nix repository.

Copy link
Member Author

Choose a reason for hiding this comment

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

It seems that @Ericson2314 was working around something.
I don't know the intricacies of this.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've switched it to the default boost package for now.

let
cpp = fileset.fileFilter (file: file.hasExt "cc" || file.hasExt "h");
in
fileset.unions [
Copy link
Member

Choose a reason for hiding this comment

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

I don't think filesets are allows in nixpkgs at the moment because of that nix bug.

Copy link
Member

Choose a reason for hiding this comment

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

This is the tracking issue: #369694

Copy link
Member Author

@roberth roberth Jan 28, 2025

Choose a reason for hiding this comment

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

The filesets are intentionally dead code to keep the files similar to upstream.

So we're not affected by the bug, but we may remove these filesets anyway. I'm neither convinced to remove them nor keep them.

Copy link
Member Author

Choose a reason for hiding this comment

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

I feel like we don't have the right info yet to base a decision on. I'd suggest to keep it as is for now and perhaps revisit the presence of unused fileset attrs in 2.27.

nativeBuildInputs = [ nix ] would have no effect before this change.

The pkg-config test on the dev output probably didn't work before, so
I've removed it for now.
@roberth
Copy link
Member Author

roberth commented Feb 9, 2025

@roberth
Copy link
Member Author

roberth commented Feb 9, 2025

I believe I've addressed @Mic92's comments sufficiently. Incremental improvements are of course still possible :)

@roberth roberth merged commit 248de28 into master Feb 9, 2025
26 of 27 checks passed
@drupol drupol deleted the nix-2.26.0 branch February 9, 2025 20:20
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2024-02-12-nix-team-meeting-minutes-212-5/60216/1

@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented Feb 14, 2025

Successfully created backport PR for release-24.11:

@SuperSandro2000
Copy link
Member

How do you now apply a patch to nix?

Given a set of layers, create a mkDerivation-like function
*/
mkPackageBuilder =
exts: userFn: stdenv.mkDerivation (lib.extends (lib.composeManyExtensions exts) userFn);
Copy link
Member

Choose a reason for hiding this comment

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

Might worth extending this to a general helper function. This looks better than the implementation of various custom builders currently, and can make builders follow mkDerivation rules more, like finalAttrs

Copy link
Member Author

Choose a reason for hiding this comment

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

I was contemplating to insert a callback to allow overriding, somewhere near here, but got side tracked.
It should allow source overriding, or even overriding attributes in all component packages at once.

general helper function

If you're suggesting to turn this into a general Nixpkgs utility, I'd prefer to switch to #296769 instead, because this solution still has issues like no package-local non-derivation variables, messy returned attrs. It'd also be nice to have a path towards multi-derivation package outputs, of which we have a messy implementation right now in everything.nix, which I think currently has an issue that could've been avoided, but not with mkDerivation.

@roberth
Copy link
Member Author

roberth commented Feb 18, 2025

Cooking up a solution at NixOS/nix#12503, to keep the expressions harmonized. (Useful when your patches aren't merged and you want to skip forward to a git revision, for example)

When merged and upstreamed:

nix.appendPatches [ ./foo.patch (fetchpatch2 { ... }) ]

@Aleksanaa
Copy link
Member

Also why you are not updating nixVersions.latest? Am I missing some context here?

@roberth
Copy link
Member Author

roberth commented Mar 1, 2025

#383508 is ready for review.

Also why you are not updating nixVersions.latest?

That is the intent. Considering that the packaging has changed a bit I think it was good not to increment nix for .latest users yet. I think it'd be good to bump it to _2_26 when the packaging related issues have been addressed. I think #383508 solves most of them, so we could do it in that PR or shortly after.

EDIT: not bumping to 2.25 was a mistake.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/flakes-blocker-for-org-users-github-ratelimit-and-need-for-flake-mirroring/58058/41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants