Open
Description
Problem
Here's the documentation for import: https://nix.dev/manual/nix/2.24/language/builtins.html#builtins-import
It says the argumen to the import function has to be a path.
Counter example:
#flake.nix
{
description = "Hello world flake";
inputs = {
nixpkgs = {
url = "github:NixOS/nixpkgs/nixos-unstable";
};
};
outputs = { self, nixpkgs }: {
debug = {
nixpkgs = nixpkgs;
};
};
}
❯ nix repl
Nix 2.26.3
Type :? for help.
nix-repl> :lf .
Added 9 variables.
nix-repl> builtins.typeOf debug.nixpkgs
"set"
nix-repl> foo = import debug.nixpkgs {}
How does this work?
Proposal
Checklist
- checked latest Nix manual (source)
- checked open documentation issues and pull requests for possible duplicates
Add 👍 to issues you find important.