biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / build-support / fetchfossil / builder.sh
blobfe828d0ada9d0f6fc520b262741b737ec7dae26d
1 if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
2 source $stdenv/setup
3 echo "Cloning Fossil $url [$rev] into $out"
5 # Fossil, bless its adorable little heart, wants to write global configuration
6 # to $HOME/.fossil. AFAICT, there is no way to disable this functionality.
7 # Instead, we'll let it write to the build directory.
8 export HOME=$(pwd)
10 # We must explicitly set the admin user for the clone to something reasonable.
11 fossil clone -A nobody "$url" fossil-clone.fossil
13 mkdir fossil-clone
14 WORKDIR=$(pwd)
15 mkdir $out
16 pushd $out
17 fossil open "$WORKDIR/fossil-clone.fossil" "$rev"
18 popd
20 # Just nuke the checkout file.
21 rm $out/.fslckout