Description
Platform
- Linux:
- macOS
- WSL
Additional information
Output
$ git clone --depth=1 https://github.com/NixOS/nixpkgs.git
$ docker run -it -v $(pwd)/nixpkgs:/nixpkgs nixos/nix
docker> nix-build -I nixpkgs=/nixpkgs -A hello
docker> find ./result # this symlink points to the build package
Output
Missing -> "cd nixpkgs/" on install documentationStatus: Downloaded newer image for nixos/nix:latest
bash-5.2# nix-build -I nixpkgs=/nixpkgs -A hello
error: path '/default.nix' does not exist
bash-5.2# ls
bash-5.2# cd nixpkgs/
bash-5.2# ls
CONTRIBUTING.md COPYING README.md ci default.nix doc flake.nix lib maintainers nixos pkgs shell.nix
bash-5.2# nix-build -I nixpkgs=/nixpkgs -A hello
these 5 paths will be fetched (6.81 MiB download, 31.25 MiB unpacked):
/nix/store/m71p7f0nymb19yn1dascklyya2i96jfw-glibc-2.39-52
/nix/store/kwmqk7ygvhypxadsdaai27gl6qfxv7za-hello-2.12.1
/nix/store/pq755f1pxaas9q7666wzdzxidcvf9frg-libidn2-2.3.7
/nix/store/vf553z7mi2vqk8ca6kkfd9x5gy3nnz0p-libunistring-1.1
/nix/store/bihw7p4zdqwyxmnc8h67c06lnjkvdan8-xgcc-13.3.0-libgcc
copying path '/nix/store/bihw7p4zdqwyxmnc8h67c06lnjkvdan8-xgcc-13.3.0-libgcc' from 'https://cache.nixos.org'...
copying path '/nix/store/vf553z7mi2vqk8ca6kkfd9x5gy3nnz0p-libunistring-1.1' from 'https://cache.nixos.org'...
copying path '/nix/store/pq755f1pxaas9q7666wzdzxidcvf9frg-libidn2-2.3.7' from 'https://cache.nixos.org'...
copying path '/nix/store/m71p7f0nymb19yn1dascklyya2i96jfw-glibc-2.39-52' from 'https://cache.nixos.org'...
copying path '/nix/store/kwmqk7ygvhypxadsdaai27gl6qfxv7za-hello-2.12.1' from 'https://cache.nixos.org'...
/nix/store/kwmqk7ygvhypxadsdaai27gl6qfxv7za-hello-2.12.1
bash-5.2#
Priorities
Add 👍 to issues you find important.