2023-09-28 13:09:26 +00:00
|
|
|
if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
|
2016-08-19 05:29:30 +00:00
|
|
|
source $stdenv/setup
|
2023-01-15 22:08:12 +00:00
|
|
|
echo "Cloning Fossil $url [$rev] into $out"
|
2016-08-19 05:29:30 +00: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 06:16:37 +00:00
|
|
|
# Instead, we'll let it write to the build directory.
|
|
|
|
export HOME=$(pwd)
|
2016-08-19 05:29:30 +00: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 20:55:10 +00:00
|
|
|
fossil open "$WORKDIR/fossil-clone.fossil" "$rev"
|
2016-08-19 05:29:30 +00:00
|
|
|
popd
|
|
|
|
|
|
|
|
# Just nuke the checkout file.
|
|
|
|
rm $out/.fslckout
|