Skip to content

Comments

top-level: use callPackages where inheriting packages#282015

Merged
NickCao merged 1 commit intoNixOS:masterfrom
SuperSandro2000:callPackages
Jan 19, 2024
Merged

top-level: use callPackages where inheriting packages#282015
NickCao merged 1 commit intoNixOS:masterfrom
SuperSandro2000:callPackages

Conversation

@SuperSandro2000
Copy link
Member

@SuperSandro2000 SuperSandro2000 commented Jan 19, 2024

Description of changes

otherwise those packages cannot be overriden

nix-repl> nomad.override
error: attribute 'override' missing

       at «string»:1:1:

            1| nomad.override
             | ^

With this change they can be overriden

nix-repl> nomad.override
{ __functionArgs = { ... }; __functor = «lambda @ /home/sandro/src/nixpkgs2/lib/trivial.nix:440:19»; }

Resubmition because of revert in #281932 because of an oversight of me.

I tested this with

NIXPKGS_ALLOW_UNFREE=1 NIXPKGS_ALLOW_NONSOURCE=1 NIXPKGS_ALLOW_BROKEN=1 nix build --impure .#prefetch-yarn-deps .#python3Packages.dash .#ivpn .#ivpn-service .#charles3 .#charles4 .#msrtool .#cbmem .#ifdtool .#intelmetool .#cbfstool .#nvramtool .#superiotool .#ectool .#inteltool .#amdfwtool .#acpidump-all .#coreboot-utils .#garage .#garage_0_8 .#garage_0_9 .#garage_0_8_4 .#garage_0_9_0 .#nextcloud26 .#nextcloud27 .#nextcloud28 .#nomad .#nomad_1_4 .#nomad_1_5 .#nomad_1_6 .#nomad_1_7

I used python3Packages.dash instead of fetchYarnDeps because that cannot be directly evaluated.

Please merge this before the next nixos-unstable otherwise we leave configs broken with evaluation errors.

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.

 otherwise those packages cannot be overriden

 Resubmition because of revert in NixOS#281932
@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 NickCao merged commit d3ccd6d into NixOS:master Jan 19, 2024
@SuperSandro2000 SuperSandro2000 deleted the callPackages branch January 20, 2024 00:09
@SuperSandro2000
Copy link
Member Author

Thanks! If there happens to be another issue, please give me a ping and I take a look into it.

@RaitoBezarius
Copy link
Member

This should have been backported because this is a bugfix.

@github-actions
Copy link
Contributor

Backport failed for release-23.11, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release-23.11
git worktree add -d .worktree/backport-282015-to-release-23.11 origin/release-23.11
cd .worktree/backport-282015-to-release-23.11
git switch --create backport-282015-to-release-23.11
git cherry-pick -x a276e8b09bf0eb21ff2f46cf8680edc16cc517c2

@lilyinstarlight
Copy link
Member

Backport in #297051

@SuperSandro2000
Copy link
Member Author

This should have been backported because this is a bugfix.

Since this was the second try already and fully testing this is kinda cumbersome, I was a bit conservative of backporting.

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.

4 participants