1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-08 02:43:54 +02:00

Merge branch 'master' into bundler_drv

This commit is contained in:
tomberek 2022-01-28 10:18:29 -05:00 committed by GitHub
commit 2bf96bd9f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 166 additions and 27171 deletions

View file

@ -0,0 +1 @@
3

View file

@ -0,0 +1,2 @@
((__curPosFoo: __curPosFoo) 1) + ((__curPosBar: __curPosBar) 2)

View file

@ -63,6 +63,8 @@ nix_tests = \
ca/nix-copy.sh \
eval-store.sh \
readfile-context.sh \
store-ping.sh \
nix_path.sh \
why-depends.sh
# parallel.sh

11
tests/nix_path.sh Normal file
View file

@ -0,0 +1,11 @@
# Regression for https://github.com/NixOS/nix/issues/5998 and https://github.com/NixOS/nix/issues/5980
source common.sh
export NIX_PATH=non-existent=/non-existent/but-unused-anyways:by-absolute-path=$PWD:by-relative-path=.
nix-instantiate --eval -E '<by-absolute-path/simple.nix>' --restrict-eval
nix-instantiate --eval -E '<by-relative-path/simple.nix>' --restrict-eval
# Should ideally also test this, but theres no pure way to do it, so just trust me that it works
# nix-instantiate --eval -E '<nixpkgs>' -I nixpkgs=channel:nixos-unstable --restrict-eval

13
tests/store-ping.sh Normal file
View file

@ -0,0 +1,13 @@
source common.sh
STORE_INFO=$(nix store ping 2>&1)
echo "$STORE_INFO" | grep "Store URL: ${NIX_REMOTE}"
if [[ -v NIX_DAEMON_PACKAGE ]] && isDaemonNewer "2.7.0pre20220126"; then
DAEMON_VERSION=$($NIX_DAEMON_PACKAGE/bin/nix-daemon --version | cut -d' ' -f3)
echo "$STORE_INFO" | grep "Version: $DAEMON_VERSION"
fi
expect 127 NIX_REMOTE=unix:$PWD/store nix store ping || \
fail "nix store ping on a non-existent store should fail"