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

aliases: keep the utillinux alias until node2nix is phased out #349783

Merged
merged 1 commit into from
Oct 20, 2024

Conversation

samueltardieu
Copy link
Contributor

@samueltardieu samueltardieu commented Oct 19, 2024

The util-linux alias to utillinux has been replaced by a throw in commit a9e1f4e. The check in node-env.nix must be reversed, it was previously a no-op (because of the alias) but will now lead to a failure as it will select the utillinux throw over the util-linux package.

Also, tidy things up by using the util-linux variable name instead of the older utillinux.

The code generated by node2nix checks that pkgs.utillinux exist and uses it over pkgs.util-linux. Replacing the alias by a throw, as was done in commit a9e1f4e, makes packages generated using node2nix fail.

This removes the alias removal until node2nix has been phased out, which is a work in progress started in #229475.

This PR fixes the build process of packages such as "emojione" but doesn't cause them to be rebuilt (so no "staging" merge), it prevents them from failing the build, which would happen without this change.

  • 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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.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.

Add a 👍 reaction to pull requests you find important.

@samueltardieu
Copy link
Contributor Author

(ping @AndersonTorres)

MisileLab added a commit to MisileLab/h3 that referenced this pull request Oct 19, 2024
let's hope NixOS/nixpkgs#349783 merge fast

Signed-off-by: misilelab <[email protected]>
@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 Oct 19, 2024
Copy link
Member

@felbinger felbinger left a comment

Choose a reason for hiding this comment

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

Looks good to me

@wegank wegank added the 12.approvals: 2 This PR was reviewed and approved by two reputable people label Oct 19, 2024
@Artturin
Copy link
Member

The whole variable should be removed

Should also be fixed upstream too @svanderburg https://github.com/svanderburg/node2nix/blob/master/nix/node-env.nix#L7

@Artturin
Copy link
Member

Artturin commented Oct 20, 2024

This pr might also be reverted by node2nix like what happened in #319134 (comment)

https://github.com/orgs/nix-community/discussions/1523

@Artturin
Copy link
Member

@AndersonTorres revert removing this alias and add # keep to it until its fixed upstream and a new ver is released

The code generated by `node2nix` checks that `pkgs.utillinux` exist and
uses it over `pkgs.util-linux`. Replacing the alias by a `throw`, as was
done in commit a9e1f4e, makes packages
generated using `node2nix` fail.

This removes the alias removal until `node2nix` has been phased out,
which is a work in progress started in
NixOS#229475.
@samueltardieu samueltardieu changed the title node-packages: use util-linux instead of utillinux in node-env.nix aliases: keep the utillinux alias until node2nix is phased out Oct 20, 2024
@samueltardieu
Copy link
Contributor Author

@Artturin I've amended this PR to revert the alias removal until node2nix is phased out.

I have also submitted svanderburg/node2nix#336 so that node2nix can get fixed until it is phased out to prevent problems if people keep using it while the alias has been converted to a throw again in the future.

@emilazy
Copy link
Member

emilazy commented Oct 21, 2024

We should probably just apply the patch to our node2nix so we’re not blocked on an unmaintained upstream. We already have several load‐bearing patches.

@sternenseemann
Copy link
Member

Yeah I started on that, but we also need another patch to get rid of stdenv.isDarwin etc. in the generated output. #341407 changed that which is good, but unfortunately without adjusting the code generator.

@emilazy
Copy link
Member

emilazy commented Oct 21, 2024

Perhaps it would be better to simply eliminate the remaining few in‐tree uses, since my experience the last time we had to test a patch was that it was very hard to even package anything modern with it at this point.

@sternenseemann
Copy link
Member

Probably takes 15min to make a patch… much easier.

@nixos-discourse
Copy link

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

https://discourse.nixos.org/t/cant-find-whats-incorrectly-referencing-utillinux-instead-of-util-linux/54757/3

@kjeremy
Copy link
Contributor

kjeremy commented Oct 22, 2024

This breaks my nixos-rebuild --switch with:

error: 'utillinux' has been renamed to/replaced by 'util-linux'

because of https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/node-packages/node-env.nix#L7

@Artturin
Copy link
Member

This breaks my nixos-rebuild --switch with:

error: 'utillinux' has been renamed to/replaced by 'util-linux'

because of master/pkgs/development/node-packages/node-env.nix#L7

This fixes that

@kjeremy
Copy link
Contributor

kjeremy commented Oct 22, 2024

This breaks my nixos-rebuild --switch with:

error: 'utillinux' has been renamed to/replaced by 'util-linux'

because of master/pkgs/development/node-packages/node-env.nix#L7

This fixes that

Apparently I need more sleep. I read the diff backwards

@nixos-discourse
Copy link

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

https://discourse.nixos.org/t/cant-find-whats-incorrectly-referencing-utillinux-instead-of-util-linux/54757/8

manuelbb-upb added a commit to manuelbb-upb/nixos that referenced this pull request Oct 23, 2024
Set `nixpkgs` to follow `nixpkgs-unstable` instead of `nixos-unstable`
due to nix-community/home-manager#5991, caused
by NixOS/nixpkgs@a9e1f4e
reverted by NixOS/nixpkgs#349783
Should eventually be fixed in home-manager itself.

Also pointed scientific-fhs to my fork:
* new Julia versions
* work around olynch/scientific-fhs#20
manuelbb-upb added a commit to manuelbb-upb/nixos that referenced this pull request Oct 23, 2024
Set `nixpkgs` to follow `nixpkgs-unstable` instead of `nixos-unstable`
due to nix-community/home-manager#5991, caused
by NixOS/nixpkgs@a9e1f4e
reverted by NixOS/nixpkgs#349783
Should eventually be fixed in home-manager itself.

Also pointed `scientific-fhs` to my fork:
* new Julia versions
* work around olynch/scientific-fhs#20

Everything caused because I need this pull request
catppuccin/nix#358
for KDE theming.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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 12.approvals: 2 This PR was reviewed and approved by two reputable people
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants