at master 731 B view raw
1# Setup hook to use in case a conda binary package is installed 2echo "Sourcing conda install hook" 3 4condaInstallPhase() { 5 echo "Executing condaInstallPhase" 6 runHook preInstall 7 8 # There are two different formats of conda packages. 9 # It either contains only a site-packages directory 10 # or multiple top level directories. 11 siteDir=@pythonSitePackages@ 12 if [ -e ./site-packages ]; then 13 mkdir -p $out/$siteDir 14 cp -r ./site-packages/* $out/$siteDir 15 else 16 cp -r . $out 17 rm $out/env-vars 18 fi 19 20 runHook postInstall 21 echo "Finished executing condaInstallPhase" 22} 23 24if [ -z "${installPhase-}" ]; then 25 echo "Using condaInstallPhase" 26 installPhase=condaInstallPhase 27fi