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

inputDerivation: support structuredAttrs #215173

Closed

Conversation

roberth
Copy link
Member

@roberth roberth commented Feb 7, 2023

Description of changes

Draft solution. I think we'll want to route coreutils into here, so we can mkdir and get rid of dog.

#206728 also happens to route more stuff into here, so I think we should perhaps just bring a pkgs into scope, so as not to duplicate too many things. Downside is a potential infinite recursion comes into scope, but using file structure to "enforce" a lack of those is probably not the best strategy.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 23.05 Release Notes (or backporting 22.11 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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added the 6.topic: stdenv Standard environment label Feb 7, 2023
@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 Feb 7, 2023
@roberth roberth force-pushed the inputDerivation-structuredAttrs branch from c19aaf2 to b44502b Compare February 23, 2023 19:34
@roberth
Copy link
Member Author

roberth commented Feb 23, 2023

re @infinisil

I'm actually not sure what use cases inputDerivation has now that mkShell is buildable. They are using essentially the same approach though, it would be good to keep them in sync somehow

There's a performance cost associated with largely unused attributes like this one, so without a reason for this to be an attribute, I think it's better to remove it.

Alternatively, we could replace it by a devShell attribute, which unlike this one has a reason to be a derivation attribute, which is to allow customization of nix behavior via passthru. See

The difference is that the customization of devShell can only be achieved by tying it to the derivation, but the user experience is otherwise quite similar.

@wegank wegank added 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 2.status: merge conflict This PR has merge conflicts with the target branch labels Mar 19, 2024
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 20, 2024
@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 4, 2024
@wolfgangwalther
Copy link
Contributor

Superseded by #361233

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 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: stdenv Standard environment 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants