Skip to content

Revert "top-level: use callPackages where inheriting packages"#281932

Merged
NickCao merged 1 commit intoNixOS:masterfrom
l0b0:fix-callpackage-evaluations
Jan 19, 2024
Merged

Revert "top-level: use callPackages where inheriting packages"#281932
NickCao merged 1 commit intoNixOS:masterfrom
l0b0:fix-callpackage-evaluations

Conversation

@l0b0
Copy link
Contributor

@l0b0 l0b0 commented Jan 19, 2024

Description of changes

Closes #281680.

This reverts commit 99159b6.

@SuperSandro2000 Do you have more details about the use case for callPackages? Maybe there's a way both use cases can be supported.

I would like to write a test for the Citrix Workspace override, but the way I read the required manual steps I don't think it would be legal.

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/)
  • 24.05 Release Notes (or backporting 23.05 and 23.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.

Add a 👍 reaction to pull requests you find important.

@l0b0 l0b0 requested review from SuperSandro2000 and mjm January 19, 2024 02:01
@mjm
Copy link
Contributor

mjm commented Jan 19, 2024

I went through and checked each of these, and I think most of them should stay. The only ones that should be reverted are:

  • citrix-workspace
  • netbox
  • plik

These 3 use callPackage within the file, so those derivations were already overridable, and using callPackages to pull them in means that override gets replaced with the wrong one that doesn't include all the arguments they use.

All of the others don't use callPackage inside the file for individual packages, instead declaring all dependencies as arguments for that file and building the packages within there. So they should keep using callPackages.

I'll open another PR that just reverts those.

@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 Jan 19, 2024
@NickCao
Copy link
Member

NickCao commented Jan 19, 2024

I guess this has something to do with how the package set is actually called, so we have to evaluate the use of callPackages case by case. Let's revert it as a whole for now.

@NickCao NickCao merged commit c03ef44 into NixOS:master Jan 19, 2024
@NickCao
Copy link
Member

NickCao commented Jan 19, 2024

These 3 use callPackage within the file, so those derivations were already overridable, and using callPackages to pull them in means that override gets replaced with the wrong one that doesn't include all the arguments they use.

I think we should instead formalize how to construct these package sets.

@mjm
Copy link
Contributor

mjm commented Jan 19, 2024

Okay, that makes sense. I won't make any changes in that case.

@l0b0 l0b0 deleted the fix-callpackage-evaluations branch January 19, 2024 02:32
@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Jan 19, 2024

Why did you revert everything? Someone already dug up which packages would need this removed and which don't and where my oversight was im the initial change.

Also one hour is not enough time to react. I would have created a fix for this now which wouldn't have broken other uses.

Now I must create a PR with everything except the Citrix, netbox and plik or otherwise my config won't evaluate and I cannot fix it in my config....

Do you have more details about the use case for callPackages? Maybe there's a way both use cases can be supported.

I think it always needs to be used when callPackage isn't used in an attrSet and is is inherited. After I found the third package which didn't use this correct, I just converted all of them at once in the knowledge that it would just work and that ofborg would complain if it wouldn't.

SuperSandro2000 added a commit to SuperSandro2000/nixpkgs that referenced this pull request Jan 19, 2024
 otherwise those packages cannot be overriden

 Resubmition because of revert in NixOS#281932
@SuperSandro2000
Copy link
Member

Can you please take a look at #282015 before nixos-unstable advances? Thanks!

lilyinstarlight pushed a commit that referenced this pull request Mar 18, 2024
 otherwise those packages cannot be overriden

 Resubmition because of revert in #281932

(cherry picked from commit a276e8b)
zeme-wana pushed a commit to input-output-hk/nixpkgs that referenced this pull request May 8, 2024
 otherwise those packages cannot be overriden

 Resubmition because of revert in NixOS#281932

(cherry picked from commit a276e8b)
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

netbox module won't evaluate in recent nixos-unstable

4 participants