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

Merge remote-tracking branch 'origin/master' into lazy-trees

This commit is contained in:
Eelco Dolstra 2022-10-26 16:30:23 +02:00
commit e2353b9b45
33 changed files with 196 additions and 55 deletions

View file

@ -0,0 +1 @@
true

View file

@ -1 +0,0 @@
Bool(True)

View file

@ -4,6 +4,7 @@ let
name2 = "hello";
name3 = "915resolution-0.5.2";
name4 = "xf86-video-i810-1.7.4";
name5 = "name-that-ends-with-dash--1.0";
eq = 0;
lt = builtins.sub 0 1;
@ -23,6 +24,8 @@ let
((builtins.parseDrvName name3).version == "0.5.2")
((builtins.parseDrvName name4).name == "xf86-video-i810")
((builtins.parseDrvName name4).version == "1.7.4")
((builtins.parseDrvName name5).name == "name-that-ends-with-dash")
((builtins.parseDrvName name5).version == "-1.0")
(versionTest "1.0" "2.3" lt)
(versionTest "2.1" "2.3" lt)
(versionTest "2.3" "2.3" eq)

View file

@ -111,6 +111,7 @@ nix_tests = \
fetchClosure.sh \
completions.sh \
impure-derivations.sh \
path-from-hash-part.sh \
toString-path.sh
ifeq ($(HAVE_LIBCPUID), 1)

View file

@ -0,0 +1,10 @@
source common.sh
path=$(nix build --no-link --print-out-paths -f simple.nix)
hash_part=$(basename $path)
hash_part=${hash_part:0:32}
path2=$(nix store path-from-hash-part $hash_part)
[[ $path = $path2 ]]