1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00
nix/tests/functional/dependencies.builder0.sh
2025-10-24 11:11:03 +02:00

22 lines
435 B
Bash

# shellcheck shell=bash
# shellcheck disable=SC2154
[ "${input1: -2}" = /. ]
# shellcheck disable=SC2154
[ "${input2: -2}" = /. ]
# shellcheck disable=SC2154
mkdir "$out"
echo "$(cat "$input1"/foo)$(cat "$input2"/bar)" > "$out"/foobar
ln -s "$input2" "$out"/reference-to-input-2
# Self-reference.
ln -s "$out" "$out"/self
# Executable.
echo program > "$out"/program
chmod +x "$out"/program
echo '1 + 2' > "$out"/foo.nix
echo FOO