utdemir / nix-tree

Interactively browse dependency graphs of Nix derivations.
BSD 3-Clause "New" or "Revised" License
701 stars 11 forks source link

Add support for nix 2.19 path-info #68

Closed GrigorenkoPV closed 9 months ago

GrigorenkoPV commented 9 months ago

Fixes #67

utdemir commented 9 months ago

Thanks!

SuperSandro2000 commented 9 months ago

Tested this with the following overlay and works like a charm

    haskellPackages = prev.haskellPackages.override (oldArgs: {
      overrides = lib.composeExtensions (oldArgs.overrides or (_: _: { }))
        (hfinal: hprev: {     ■ Unused lambda argument: hfinal
          nix-tree = haskell.lib.doJailbreak (hprev.nix-tree.overrideAttrs ({ patches ? [ ], ... }: {
            patches = patches ++ [
              # nix 2.19 compatibility
              (fetchpatch {
                url = "https://github.com/utdemir/nix-tree/pull/68.patch";
                hash = "sha256-70Xo88ZWzWUYM0qxbW64kYaVwHaYkS2dQWmBGCkL0oA=";
              })
            ];
          }));
        });
    });
lierdakil commented 9 months ago

I'm just passing by, but IIUC this code will break the moment it encounters invalid paths, because obj2LegacyArray doesn't handle the Null value, which can happen according to https://nixos.org/manual/nix/stable/release-notes/rl-2.19.

GrigorenkoPV commented 9 months ago

I'm just passing by, but IIUC this code will break the moment it encounters invalid paths, because obj2LegacyArray doesn't handle the Null value, which can happen according to https://nixos.org/manual/nix/stable/release-notes/rl-2.19.

You are correct, thank you! In reality this simply resulted in a less informative error message. Not catastrophic, but not very desirable either. Anyways, I have submitted a fix #69.