aboutsummaryrefslogtreecommitdiff
path: root/tests/functional/dyn-drv/build-built-drv.sh
blob: 647be9457167bca27a7f7a9a9aa7d99e35d07e29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env bash

source common.sh

# In the corresponding nix file, we have two derivations: the first, named `hello`,
# is a normal recursive derivation, while the second, named dependent, has the
# new outputHashMode "text". Note that in "dependent", we don't refer to the
# build output of `hello`, but only to the path of the drv file. For this reason,
# we only need to:
#
# - instantiate `hello`
# - build `producingDrv`
# - check that the path of the output coincides with that of the original derivation

out1=$(nix build -f ./text-hashed-output.nix hello --no-link)

clearStore

drvDep=$(nix-instantiate ./text-hashed-output.nix -A producingDrv)

expectStderr 1 nix build "${drvDep}^out^out" --no-link | grepQuiet "Building dynamic derivations in one shot is not yet implemented"