2023-09-28 16:09:26 +03:00
|
|
|
if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
|
2016-08-19 08:29:30 +03:00
|
|
|
source $stdenv/setup
|
2023-01-16 01:08:12 +03:00
|
|
|
echo "Cloning Fossil $url [$rev] into $out"
|
2016-08-19 08:29:30 +03:00
|
|
|
|
|
|
|
# Fossil, bless its adorable little heart, wants to write global configuration
|
|
|
|
# to $HOME/.fossil. AFAICT, there is no way to disable this functionality.
|
2016-08-19 09:16:37 +03:00
|
|
|
# Instead, we'll let it write to the build directory.
|
|
|
|
export HOME=$(pwd)
|
2016-08-19 08:29:30 +03:00
|
|
|
|
|
|
|
# We must explicitly set the admin user for the clone to something reasonable.
|
|
|
|
fossil clone -A nobody "$url" fossil-clone.fossil
|
|
|
|
|
|
|
|
mkdir fossil-clone
|
|
|
|
WORKDIR=$(pwd)
|
|
|
|
mkdir $out
|
|
|
|
pushd $out
|
2016-08-19 23:55:10 +03:00
|
|
|
fossil open "$WORKDIR/fossil-clone.fossil" "$rev"
|
2016-08-19 08:29:30 +03:00
|
|
|
popd
|
|
|
|
|
|
|
|
# Just nuke the checkout file.
|
|
|
|
rm $out/.fslckout
|