Skip to content

Comments

lib/customisation: add NoMkOverridable variants of callPackage#222950

Draft
Artturin wants to merge 2 commits intoNixOS:masterfrom
Artturin:callpackagenooverridable
Draft

lib/customisation: add NoMkOverridable variants of callPackage#222950
Artturin wants to merge 2 commits intoNixOS:masterfrom
Artturin:callpackagenooverridable

Conversation

@Artturin
Copy link
Member

in some places we want to use callPackage but don't want to inject the makeOverridable attrs so far import with manual inherits has been used

Description of changes
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
  • Fits CONTRIBUTING.md.

in some places we want to use callPackage but don't want to inject the makeOverridable attrs
so far import with manual inherits has been used
@Artturin Artturin force-pushed the callpackagenooverridable branch from 75b8adc to 1db7e42 Compare March 24, 2023 21:38
@github-actions github-actions bot added the 6.topic: erlang General-purpose, concurrent, functional high-level programming language label Mar 24, 2023
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Mar 24, 2023
@roberth roberth added the 6.topic: lib The Nixpkgs function library label Jul 8, 2023
@roberth
Copy link
Member

roberth commented Nov 12, 2023

IIUC, the purposes of callPackage are all of:

  • Using splicedPackages (as opposed to unspliced)
  • Adding overriding
    • specifically override
    • also mkDerivation overriding attrs, but only out of necessity, for multi layer overriding to be somewhat coherent.
  • The same thing that lazyFunction does (lib.lazyFunction: init #194514)

So by removing overriding, it seems that you could simplify all this by leaving callPackage untouched and instead implementing this variation with lazyFunction and splicedPackages instead. callPackage is already rather complicated, so that would be much nicer.

@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
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: erlang General-purpose, concurrent, functional high-level programming language 6.topic: lib The Nixpkgs function library 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants