* Use absolute paths.
This commit is contained in:
		
							parent
							
								
									63791eb05b
								
							
						
					
					
						commit
						9ee88bb2f2
					
				
					 2 changed files with 8 additions and 8 deletions
				
			
		|  | @ -73,7 +73,7 @@ addToQueue $targetPath; | |||
| 
 | ||||
| sub isValidPath { | ||||
|     my $p = shift; | ||||
|     system "nix-store --isvalid '$p' 2> /dev/null"; | ||||
|     system "@bindir@/nix-store --isvalid '$p' 2> /dev/null"; | ||||
|     return $? == 0; | ||||
| } | ||||
| 
 | ||||
|  | @ -96,7 +96,7 @@ while ($queueFront < scalar @queue) { | |||
|         foreach my $patch (@{$patchList}) { | ||||
|             if (isValidPath($patch->{basePath})) { | ||||
|                 # !!! this should be cached | ||||
|                 my $hash = `nix-hash "$patch->{basePath}"`; | ||||
|                 my $hash = `@bindir@/nix-hash "$patch->{basePath}"`; | ||||
|                 chomp $hash; | ||||
| #                print "  MY HASH is $hash\n"; | ||||
|                 if ($hash ne $patch->{baseHash}) { | ||||
|  | @ -177,7 +177,7 @@ sub downloadFile { | |||
|     my $hash = shift; | ||||
|     $ENV{"PRINT_PATH"} = 1; | ||||
|     $ENV{"QUIET"} = 1; | ||||
|     my ($hash2, $path) = `nix-prefetch-url '$url' '$hash'`; | ||||
|     my ($hash2, $path) = `@bindir@/nix-prefetch-url '$url' '$hash'`; | ||||
|     chomp $hash2; | ||||
|     chomp $path; | ||||
|     die "hash mismatch" if $hash ne $hash2; | ||||
|  | @ -210,7 +210,7 @@ while (scalar @path > 0) { | |||
|         # Turn the base path into a NAR archive, to which we can | ||||
|         # actually apply the patch. | ||||
|         print "  packing base path...\n"; | ||||
|         system "nix-store --dump $patch->{basePath} > /tmp/nar"; | ||||
|         system "@bindir@/nix-store --dump $patch->{basePath} > /tmp/nar"; | ||||
|         die "cannot dump `$patch->{basePath}'" if ($? != 0); | ||||
| 
 | ||||
|         # Apply the patch. | ||||
|  | @ -220,7 +220,7 @@ while (scalar @path > 0) { | |||
| 
 | ||||
|         # Unpack the resulting NAR archive into the target path. | ||||
|         print "  unpacking patched archive...\n"; | ||||
|         system "nix-store --restore $v < /tmp/nar2"; | ||||
|         system "@bindir@/nix-store --restore $v < /tmp/nar2"; | ||||
|         die "cannot unpack /tmp/nar2 into `$v'" if ($? != 0); | ||||
|     } | ||||
| 
 | ||||
|  | @ -236,7 +236,7 @@ while (scalar @path > 0) { | |||
| 
 | ||||
|         # Unpack the archive into the target path. | ||||
|         print "  unpacking archive...\n"; | ||||
|         system "bunzip2 < '$narFilePath' | nix-store --restore '$v'"; | ||||
|         system "@bunzip2@ < '$narFilePath' | nix-store --restore '$v'"; | ||||
|         die "cannot unpack `$narFilePath' into `$v'" if ($? != 0); | ||||
|     } | ||||
| } | ||||
|  |  | |||
|  | @ -19,11 +19,11 @@ for i in "$@"; do | |||
|             extraArgs="$extraArgs $i" | ||||
|             ;; | ||||
|         *) | ||||
|             storeExprs=$(nix-instantiate "$i") | ||||
|             storeExprs=$(@bindir@/nix-instantiate "$i") | ||||
|             for j in $storeExprs; do | ||||
|                 echo "store expression is $j" >&2 | ||||
|             done | ||||
|             outPaths=$(nix-store -qnfv $extraArgs $storeExprs) | ||||
|             outPaths=$(@bindir@/nix-store -qnfv $extraArgs $storeExprs) | ||||
|             for j in $outPaths; do | ||||
|                 echo "$j" | ||||
|                 if test -z "$noLink"; then | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue