Skip to content

Commit 99a483d

Browse files
authored
make nixmeta.csv extensible
fixes: tiiuae#157
1 parent 05f3d71 commit 99a483d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/nixmeta/scanner.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,16 @@ def __init__(self):
2626
def scan(self, nixref):
2727
"""
2828
Scan nixpkgs meta-info using nixpkgs version pinned in nixref;
29-
nixref can be a nix store path or flakeref.
29+
nixref can be a nix store path, flakeref or dynamical attribute set.
3030
"""
3131
nixpkgs_path = nixref_to_nixpkgs_path(nixref)
3232
if not nixpkgs_path:
33-
return
33+
# try format which is understood by nix-env: https://ianthehenry.com/posts/how-to-learn-nix/chipping-away-at-flakes/
34+
# { ... }: (builtins.getFlake "ownpkgs-special-unstable").outputs.legacyPackages.${builtins.currentSystem}
35+
# NIX_PATH="nixpkgs=$HOME/.nix-defexpr/flakgs/default.nix"
36+
nixpkgs_path = pathlib.Path(nixref)
37+
if not nixpkgs_path.exists():
38+
return
3439
if not nixpkgs_path.exists():
3540
LOG.warning("Nixpkgs not in nix store: %s", nixpkgs_path.as_posix())
3641
return

0 commit comments

Comments
 (0)