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

racket: move to pkgs/by-name, combine full and minimal definitions #392518

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TomaSajt
Copy link
Contributor

@TomaSajt TomaSajt commented Mar 23, 2025

Related: #392174

Why?

pkgs/by-name gets rid of the metadata role of the file paths. Now noone can complain about whether it is an interpreter or a compiler.

To streamline this migration, I also combined minimal.nix and default.nix into the package.nix file.

IMO this is much more readable than using overrideAttrs: everything is in one place so you know what's going on.

Even though we're in pkgs/by-name, we have to still use all-packages.nix to supply the correct stdenv and the boolean.


Note: this PR causes a rebuild of racket-minimal because a key set to an empty string made by lib.optionalString is technically different from the key being unset.

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.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1 10.rebuild-linux: 1-10 labels Mar 23, 2025
@nix-owners nix-owners bot requested a review from rc-zb March 23, 2025 21:44
@rc-zb
Copy link
Contributor

rc-zb commented Mar 24, 2025

Is this a revocation of #375992? Actually, I made that because then I intended to integrate the Racket package system into Nixpkgs and bootstrap Racket from BC(minimal) to CS(minimal) to CS(full) instead of utilizing the bytecode built in the released source archives (see #373716). The separation was made so that I could focus on the minimal distribution. This plan was stuck due to obscure build failures and I have had no time to try to settle them, even until now. But I don't think it should be considered to be failed already, and someday I may pick it up.

If the classification is really important according to the upstream, IMO you should better move the recipes to pkgs/development/compilers/racket, instead of fitting them into the flattened by-name structure, which is more suitable for one-version-only packages. After all,

Even though we're in pkgs/by-name, we have to still use all-packages.nix to supply the correct stdenv and the boolean.

"--enable-liblz4"
"--enable-libz"
]
++ lib.optional disableDocs "--disable-docs"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
++ lib.optional disableDocs "--disable-docs"
++ lib.optionals disableDocs [ "--disable-docs" ]

@TomaSajt TomaSajt marked this pull request as draft March 24, 2025 16:47
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: 1-10 10.rebuild-linux: 1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants