nix: introduce fake nixpkgs (#9)

Since <nixpkgs> wasn't working, might as well make the error more
explicit. That way, users are quickly aware if they forgot to pin their
nixpkgs.
This commit is contained in:
zimbatm 2020-06-17 22:49:42 +02:00 committed by GitHub
parent 0f24a9c94a
commit 0b362172fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View file

@ -53,7 +53,7 @@ let
"ENV=/etc/profile.d/nix.sh"
"BASH_ENV=/etc/profile.d/nix.sh"
"NIX_BUILD_SHELL=/bin/bash"
"NIX_PATH=nixpkgs=${toString <nixpkgs>}"
"NIX_PATH=nixpkgs=${./fake_nixpkgs}"
"PAGER=cat"
"PATH=/usr/bin:/bin"
"SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt"

View file

@ -0,0 +1,7 @@
_:
throw ''
This container doesn't include nixpkgs.
Pin your dependencies. Or if you must, override the NIX_PATH environment
variable with eg: "NIX_PATH=nixpkgs=channel:nixos-unstable"
''