-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement top-level __findFile #248
Comments
If it is still relevant I would like to try to tackle it. Should it work something like this? hnix:master* λ ./dist/build/hnix/hnix --eval --expr "builtins.findFile nixpkgs/default.nix"
/home/drets/src/dots/channels/nixpkgs/default.nix
hnix:master* λ ./dist/build/hnix/hnix --eval --expr "builtins.findFile nixpkgs/blah.nix"
error: file 'nixpkgs/blah.nix' was not found in the Nix search path (add it using $NIX_PATH or -I) |
@drets No, |
@shlevy, thank you. It seems, I figured out how it works: ~ λ nix-instantiate --eval -E "builtins.nixPath" --strict
[ { path = "/home/drets/src/dots/nixos/configuration.nix"; prefix = "nixos-config"; } { path = "/home/drets/src/dots/channels"; prefix = ""; } { path = "/nix/store/2xzhrn49hzcpkg72sgqh6qdx0klckssv-nix-2.0/share/nix/corepkgs"; prefix = "nix"; } ]
~ λ nix-instantiate --eval -E 'builtins.findFile builtins.nixPath "nixpkgs/default.nix"' --strict
/home/drets/src/dots/channels/nixpkgs/default.nix
~ λ nix-instantiate --eval -E 'builtins.findFile builtins.nixPath "nixos-config"' --strict
/home/drets/src/dots/nixos/configuration.nix
~ λ nix-instantiate --eval -E 'builtins.findFile builtins.nixPath "nixpkgs/blah.nix"' --strict
error: file 'nixpkgs/blah.nix' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):1:1 |
No description provided.
The text was updated successfully, but these errors were encountered: