2023-11-16 04:20:00 +00:00
|
|
|
if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
|
2020-04-24 23:36:52 +00:00
|
|
|
source $stdenv/setup
|
2023-02-02 18:25:31 +00:00
|
|
|
echo "Cloning Fossil $url [$rev] into $out"
|
2020-04-24 23:36:52 +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.
|
|
|
|
# Instead, we'll let it write to the build directory.
|
|
|
|
export HOME=$(pwd)
|
|
|
|
|
|
|
|
# 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
|
|
|
|
fossil open "$WORKDIR/fossil-clone.fossil" "$rev"
|
|
|
|
popd
|
|
|
|
|
|
|
|
# Just nuke the checkout file.
|
|
|
|
rm $out/.fslckout
|