summary refs log tree commit diff
path: root/maintainers
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2021-08-31 09:15:44 +0200
committerRobert Hensing <robert@roberthensing.nl>2021-08-31 09:18:08 +0200
commiteb8e943493164009f34ba4c0a824533ce755f1dd (patch)
treed6330b0c83ad7799994bf835fdb7c1f0c16bedc4 /maintainers
parentb5f2c5f132e05537330f1ba668e57e809a2e1ad6 (diff)
downloadnixpkgs-eb8e943493164009f34ba4c0a824533ce755f1dd.tar
nixpkgs-eb8e943493164009f34ba4c0a824533ce755f1dd.tar.gz
nixpkgs-eb8e943493164009f34ba4c0a824533ce755f1dd.tar.bz2
nixpkgs-eb8e943493164009f34ba4c0a824533ce755f1dd.tar.lz
nixpkgs-eb8e943493164009f34ba4c0a824533ce755f1dd.tar.xz
nixpkgs-eb8e943493164009f34ba4c0a824533ce755f1dd.tar.zst
nixpkgs-eb8e943493164009f34ba4c0a824533ce755f1dd.zip
Fix interaction between appendOverlays and otherPackageSets
The comment

    a dirty hack that should be removed

has led me to believe that nixpkgsFun isn't the right solution,
but bypassing it is worse, because it creates a second, inner
overriding mechanism that doesn't pass its changes to the old,
outer overriding mechanism.

Before this change:

    nix-repl> ((import <nixpkgs> {}).appendOverlays([(f: s: { foobarbaz = "ok"; })])).foobarbaz
    "ok"

    nix-repl> ((import <nixpkgs> {}).appendOverlays([(f: s: { foobarbaz = "ok"; })])).pkgsCross.aarch64-multiplatform.foobarbaz
    error: attribute 'foobarbaz' missing

           at «string»:1:1:

                1| ((import <nixpkgs> {}).appendOverlays([(f: s: { foobarbaz = "ok"; })])).pkgsCross.aarch64-multiplatform.foobarbaz
                 | ^
                2|

After this change:

    nix-repl> ((import ./. {}).appendOverlays([(f: s: { foobarbaz = "ok"; })])).pkgsCross.aarch64-multiplatform.foobarbaz
    "ok"

Thanks to samueldr for discovering this problem.
Diffstat (limited to 'maintainers')
0 files changed, 0 insertions, 0 deletions