about summary refs log blame commit diff
path: root/tests/substitutes.sh
blob: 042827314bd9f7bc3459e060f94916702e903ffc (plain) (tree)
1
2
3
4
5
6
7
8
9

                

          
              
                                     
                             

                       
                                    

                              
                                    
 
                                             
 
                         

                            
                                                                                         
source common.sh

clearStore

# Instantiate.
drvPath=$($nixinstantiate simple.nix)
echo "derivation is $drvPath"

# Find the output path.
outPath=$($nixstore -qvv "$drvPath")
echo "output path is $outPath"

echo $outPath > $TEST_ROOT/sub-paths

export NIX_SUBSTITUTERS=$(pwd)/substituter.sh

$nixstore -rvv "$drvPath"

text=$(cat "$outPath"/hello)
if test "$text" != "Hallo Wereld"; then echo "wrong substitute output: $text"; exit 1; fi