Merge pull request #201735 from mcwitt/upgrade-rdkit
This commit is contained in:
commit
e4902f2eb0
1 changed files with 30 additions and 35 deletions
|
@ -1,8 +1,8 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, fetchzip
|
||||
, cmake
|
||||
, comic-neue
|
||||
, boost
|
||||
, catch2
|
||||
, inchi
|
||||
|
@ -15,32 +15,32 @@
|
|||
, numpy
|
||||
, pandas
|
||||
, pillow
|
||||
, git
|
||||
}:
|
||||
let
|
||||
external = {
|
||||
avalon = fetchzip {
|
||||
url = "http://sourceforge.net/projects/avalontoolkit/files/AvalonToolkit_1.2/AvalonToolkit_1.2.0.source.tar";
|
||||
sha256 = "0nhxfxckb5a5qs0g148f55yarhncqjgjzcvdskkv9rxi2nrs7160";
|
||||
stripRoot = false;
|
||||
avalon = fetchFromGitHub {
|
||||
owner = "rohdebe1";
|
||||
repo = "ava-formake";
|
||||
rev = "AvalonToolkit_2.0.2";
|
||||
hash = "sha256-YI39OknHiSyArNGqRKrSVzEJnFc1xJ0W3UcTZrTKeME=";
|
||||
};
|
||||
yaehmop = fetchFromGitHub {
|
||||
owner = "greglandrum";
|
||||
repo = "yaehmop";
|
||||
rev = "cfb5aeebbdf5ae93c4f4eeb14c7a507dea54ae9e";
|
||||
sha256 = "sha256-QMnc5RyHlY3giw9QmrkGntiA+Srs7OhCIKs9GGo5DfQ=";
|
||||
rev = "v2022.09.1";
|
||||
hash = "sha256-QMnc5RyHlY3giw9QmrkGntiA+Srs7OhCIKs9GGo5DfQ=";
|
||||
};
|
||||
freesasa = fetchFromGitHub {
|
||||
owner = "mittinatten";
|
||||
repo = "freesasa";
|
||||
rev = "2.1.1";
|
||||
sha256 = "sha256-fUJvLDTVhpBWl9MavZwp0kAO5Df1QuHEKqe20CXNfcg=";
|
||||
rev = "2.0.3";
|
||||
hash = "sha256-7E+imvfDAJFnXQRWb5hNaSu+Xrf9NXeIKc9fl+o3yHQ=";
|
||||
};
|
||||
};
|
||||
in
|
||||
buildPythonPackage rec {
|
||||
pname = "rdkit";
|
||||
version = "2022.03.5";
|
||||
version = "2022.09.1";
|
||||
format = "other";
|
||||
|
||||
src =
|
||||
|
@ -51,35 +51,35 @@ buildPythonPackage rec {
|
|||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "Release_${versionTag}";
|
||||
sha256 = "19idgilabh04cbr1qj6zgrgsfjm248mmfz6fsr0smrd68d0xnml9";
|
||||
hash = "sha256-AaawjCv3/ShByOKU0c37/hjuyfD7NhFC8UngDoG7C0s=";
|
||||
};
|
||||
|
||||
unpackPhase = ''
|
||||
mkdir -p source/External/AvalonTools/avalon source/External/YAeHMOP/yaehmop source/External/FreeSASA/freesasa
|
||||
cp -r ${src}/* source
|
||||
cp -r ${external.avalon}/SourceDistribution/* source/External/AvalonTools/avalon
|
||||
cp -r ${external.yaehmop}/* source/External/YAeHMOP/yaehmop
|
||||
cp -r ${external.freesasa}/* source/External/FreeSASA/freesasa
|
||||
cp -r $src/* .
|
||||
find . -type d -exec chmod +w {} +
|
||||
|
||||
find source -type d -exec chmod 755 {} +
|
||||
cp source/External/FreeSASA/freesasa2.c source/External/FreeSASA/freesasa/src
|
||||
ln -s ${rapidjson} source/External/rapidjson-1.1.0
|
||||
mkdir External/AvalonTools/avalon
|
||||
ln -s ${external.avalon}/* External/AvalonTools/avalon
|
||||
|
||||
mkdir External/YAeHMOP/yaehmop
|
||||
ln -s ${external.yaehmop}/* External/YAeHMOP/yaehmop
|
||||
|
||||
mkdir -p External/FreeSASA/freesasa
|
||||
cp -r ${external.freesasa}/* External/FreeSASA/freesasa
|
||||
chmod +w External/FreeSASA/freesasa/src
|
||||
cp External/FreeSASA/freesasa2.c External/FreeSASA/freesasa/src
|
||||
|
||||
ln -s ${rapidjson} External/rapidjson-1.1.0
|
||||
ln -s ${comic-neue}/share/fonts/truetype/ComicNeue-Regular.ttf Data/Fonts/
|
||||
'';
|
||||
|
||||
sourceRoot = "source";
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
git # required by freesasa
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
catch2
|
||||
inchi
|
||||
eigen
|
||||
cairo
|
||||
rapidjson
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -95,10 +95,6 @@ buildPythonPackage rec {
|
|||
dontUseSetuptoolsCheck = true;
|
||||
|
||||
preConfigure = ''
|
||||
# Don't want this contacting the git remote during the build
|
||||
substituteInPlace External/YAeHMOP/CMakeLists.txt --replace \
|
||||
'GIT_TAG master' 'DOWNLOAD_COMMAND true'
|
||||
|
||||
# Since we can't expand with bash in cmakeFlags
|
||||
cmakeFlags="$cmakeFlags -DPYTHON_NUMPY_INCLUDE_PATH=$(${python}/bin/python -c 'import numpy; print(numpy.get_include())')"
|
||||
cmakeFlags="$cmakeFlags -DFREESASA_DIR=$PWD/External/FreeSASA/freesasa"
|
||||
|
@ -114,7 +110,6 @@ buildPythonPackage rec {
|
|||
"-DEIGEN3_INCLUDE_DIR=${eigen}/include/eigen3"
|
||||
"-DRDK_INSTALL_INTREE=OFF"
|
||||
"-DRDK_INSTALL_STATIC_LIBS=OFF"
|
||||
"-DRDK_INSTALL_COMIC_FONTS=OFF"
|
||||
"-DRDK_BUILD_INCHI_SUPPORT=ON"
|
||||
"-DRDK_BUILD_AVALON_SUPPORT=ON"
|
||||
"-DRDK_BUILD_FREESASA_SUPPORT=ON"
|
||||
|
@ -145,9 +140,9 @@ buildPythonPackage rec {
|
|||
'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
"rdkit"
|
||||
"rdkit.Chem"
|
||||
"rdkit.Chem.AllChem"
|
||||
"rdkit"
|
||||
"rdkit.Chem"
|
||||
"rdkit.Chem.AllChem"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
|
|
Loading…
Reference in a new issue