mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-27 08:16:14 +02:00
21 lines
332 B
Bash
Executable file
21 lines
332 B
Bash
Executable file
#! /bin/sh
|
|
|
|
#set -x
|
|
|
|
drv=$4
|
|
|
|
echo "HOOK for $drv" >&2
|
|
|
|
outPath=$(sed 's/Derive(\[("out",\"\([^\"]*\)\".*/\1/' $drv)
|
|
|
|
echo "output path is $outPath" >&2
|
|
|
|
if $(echo $outPath | grep -q input-1); then
|
|
echo "accept" >&3
|
|
read x <&4
|
|
echo "got $x"
|
|
mkdir $outPath
|
|
echo "BAR" > $outPath/foo
|
|
else
|
|
echo "decline" >&3
|
|
fi
|