Skip to content

nim: huge refactor of packages#496960

Open
Eveeifyeve wants to merge 6 commits into
NixOS:masterfrom
Eveeifyeve:nim-refractor-1
Open

nim: huge refactor of packages#496960
Eveeifyeve wants to merge 6 commits into
NixOS:masterfrom
Eveeifyeve:nim-refractor-1

Conversation

@Eveeifyeve
Copy link
Copy Markdown
Member

@Eveeifyeve Eveeifyeve commented Mar 5, 2026

Why do a huge refractor? With the upcoming nim changes (eg. new versions) it's time that nixpkgs had a huge refractor of packages/attention to keep up so this pr deprecates nim1 and nim2 (with respective unwrap) packages with the upgrade nim to 2.2.10 and making nim use a boostrapped compiler. This fixes the nim-unwrapped pname issue with using name instead of pname.

There was a old previous pr here, however I accidentally was on the wrong branch working on the nim builder refractor as this pr is already big enough, I wanted the version change/stdenv move in this pr and did a push that deleted the changes accidentally, so I remade this pr. 😆

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

@Eveeifyeve Eveeifyeve requested a review from daylinmorgan March 5, 2026 18:24
@Eveeifyeve Eveeifyeve changed the title Nim refractor 1 nim: huge refractor of versioning. Mar 5, 2026
@Eveeifyeve Eveeifyeve requested review from a team and removed request for daylinmorgan March 6, 2026 09:33
@Eveeifyeve

This comment was marked as resolved.

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 8.has: changelog This PR adds or changes release notes 6.topic: nim Nim programing language 8.has: documentation This PR adds or changes documentation labels Mar 6, 2026
@Eveeifyeve Eveeifyeve mentioned this pull request Mar 6, 2026
13 tasks
@Eveeifyeve Eveeifyeve force-pushed the nim-refractor-1 branch 2 times, most recently from d5b6793 to 1c3aa5e Compare March 6, 2026 11:52
@Eveeifyeve Eveeifyeve added this to the 26.05 milestone Mar 6, 2026
@Eveeifyeve

This comment was marked as outdated.

Comment thread pkgs/build-support/build-nim-package.nix
@Eveeifyeve

This comment was marked as outdated.

@nixos-discourse
Copy link
Copy Markdown

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

https://discourse.nixos.org/t/prs-already-reviewed/2617/2941

@Eveeifyeve Eveeifyeve removed this from Nixpkgs Lib Apr 16, 2026
@Eveeifyeve Eveeifyeve changed the title nim: huge refactor of nim packages nim: huge refactor of packages Apr 22, 2026
@nixos-discourse
Copy link
Copy Markdown

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

https://discourse.nixos.org/t/prs-already-reviewed/2617/2965

@daylinmorgan
Copy link
Copy Markdown
Contributor

FYI: 2.2.10 was released https://nim-lang.org/blog/2026/04/24/nim-2210.html

@Eveeifyeve
Copy link
Copy Markdown
Member Author

Eveeifyeve commented Apr 24, 2026

FYI: 2.2.10 was released nim-lang.org/blog/2026/04/24/nim-2210.html

Again, this is best in followup. I will happily accept it into the nim updates. I am just waiting for a merge/more reviews on this pr. As I will quote from @Sigmanificient from when I asked kindly if they could take a look at my pr in the unofficial discord:

yeah but
it looks scarry
I've done 30 lines of nim in my life?
How much packages in nim ?
feature freeze it kinda soon

I asked again later on in the vc the response was:

i think your pr is too scary

I might start spliting some of the changes like stdenv into a seperate pr just to help the merge process. UPDATE: Split to help the merge process: #513302 and also the marking nim_lk as a seperate pr and combined some of the commits together.

@nixpkgs-ci nixpkgs-ci Bot removed the 6.topic: lib The Nixpkgs function library label Apr 25, 2026
@Eveeifyeve Eveeifyeve requested a review from daylinmorgan April 25, 2026 08:26
@Eveeifyeve Eveeifyeve added the 2.status: wait for branch‐off Waiting for the next Nixpkgs branch‐off label Apr 25, 2026
Eveeifyeve and others added 6 commits April 26, 2026 03:35
writers/writeNim: migrate package to nim
nim: remove nativeStacktraces and gnuReadline args
nim: use pname instead

It's time that we remove nim1, nim1 has been a package for a while and
nim has moved on during that time to the v2 versions.
It's also time that nim had some attention in nixpkgs and upgrade the
nim 2 versions.

Also fixes an issue with nim-unwrapped missing the pname and version.
See NixOS#485742 for more info.

Co-authored-by: éclairevoyant
<848000+eclairevoyant@users.noreply.github.com>
With the rise of the nim refractor this removes the need to specify
versions.

Co-authored-by: éclairevoyant
<848000+eclairevoyant@users.noreply.github.com>
This makes nim use a boostrappped compiler.
This fixes an issue with openssl patch in nim where gimportc was invalid
Co-authored-by: Jake Leahy <jake@leahy.dev>
This fixes an issue where nim-gdb does find gdb in path
nim_lk: fix compatiblity with 2.2.8
@Eveeifyeve Eveeifyeve removed the 2.status: wait for branch‐off Waiting for the next Nixpkgs branch‐off label Apr 26, 2026
@Eveeifyeve
Copy link
Copy Markdown
Member Author

Eveeifyeve commented Apr 27, 2026

According to the release schedule all breaking changes are now restricted, with the exception of desktop environment updates. So I will be marking this as wait till branchoff, before we can merge this pr in. It would be helpful to get some reviews from anyone, I will also remove people who are from the stdenv team as the changes were moved to a seperate pr.

Comment thread pkgs/by-name/ni/nimlsp/package.nix
Comment thread pkgs/by-name/mo/mosdepth/package.nix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge conflict This PR has merge conflicts with the target branch 6.topic: nim Nim programing language 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants