nixpkgs/pkgs/by-name/sa/salmon/fetch-pufferfish.patch
2024-03-17 23:24:42 +01:00

61 lines
1.9 KiB
Diff

diff --git a/scripts/fetchPufferfish.sh b/scripts/fetchPufferfish.sh
index 95e30053..8866767c 100755
--- a/scripts/fetchPufferfish.sh
+++ b/scripts/fetchPufferfish.sh
@@ -11,10 +11,6 @@ CURR_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
EXTERNAL_DIR=${CURR_DIR}/../external
INSTALL_DIR=${CURR_DIR}/../external/install
-if [ -d ${EXTERNAL_DIR}/pufferfish ] ; then
- rm -fr ${EXTERNAL_DIR}/pufferfish
-fi
-
if [ -d ${INSTALL_DIR}/include/pufferfish ] ; then
rm -fr ${INSTALL_DIR}/include/pufferfish
fi
@@ -23,42 +19,10 @@ if [ -d ${INSTALL_DIR}/src/pufferfish ] ; then
rm -fr ${INSTALL_DIR}/src/pufferfish
fi
-SVER=salmon-v1.10.3
-#SVER=develop
-#SVER=sketch-mode
-
-EXPECTED_SHA256=52b6699de0d33814b73edb3455175568c2330d8014be017dce7b564e54134860
-
-mkdir -p ${EXTERNAL_DIR}
-curl -k -L https://github.com/COMBINE-lab/pufferfish/archive/${SVER}.zip -o ${EXTERNAL_DIR}/pufferfish.zip
-
-hashcheck=""
-if exists sha256sum; then
- hashcheck="sha256sum"
-elif exists shasum; then
- hashcheck="shasum -a256"
-else
- unset hashcheck
-fi
-
-
-if [ -z "${hashcheck-}" ]; then
- echo "Couldn't find shasum command; can't verify contents of downloaded pufferfish";
-else
-
- if [[ $SVER != develop && $SVER != onetbb ]]; then
- echo "${EXPECTED_SHA256} ${EXTERNAL_DIR}/pufferfish.zip" | ${hashcheck} -c - || { echo "pufferfish.zip did not match expected SHA1! Exiting."; exit 1; }
- else
- echo "not testing sha since pulling from develop"
- fi
-fi
-
-
-rm -fr ${EXTERNAL_DIR}/pufferfish
-unzip ${EXTERNAL_DIR}/pufferfish.zip -d ${EXTERNAL_DIR}
-mv ${EXTERNAL_DIR}/pufferfish-${SVER} ${EXTERNAL_DIR}/pufferfish
mkdir -p ${INSTALL_DIR}/include/pufferfish
+# This is needed later when pufferfish is compiled for Salmon
+cp -r ${pufferFishSrc} ${EXTERNAL_DIR}/pufferfish
cp ${EXTERNAL_DIR}/pufferfish/include/ProgOpts.hpp ${INSTALL_DIR}/include/pufferfish
cp ${EXTERNAL_DIR}/pufferfish/include/BooPHF.hpp ${INSTALL_DIR}/include/pufferfish