From 9c162827e78aa5663ba76fea7e19ed2088a6f8ad Mon Sep 17 00:00:00 2001 From: Phillip Seeber Date: Thu, 3 Jun 2021 10:19:30 +0200 Subject: [PATCH] qcelemental: backport upstream patch Qcelemental constructs binary search paths wrong and therefore discards intended results silently. See https://github.com/MolSSI/QCElemental/pull/265 qcelemental: use fetchpatch to get patches --- .../python-modules/qcelemental/default.nix | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/qcelemental/default.nix b/pkgs/development/python-modules/qcelemental/default.nix index 52cd264a005a..7d1dcdeb1c7b 100644 --- a/pkgs/development/python-modules/qcelemental/default.nix +++ b/pkgs/development/python-modules/qcelemental/default.nix @@ -1,5 +1,5 @@ -{ buildPythonPackage, lib, fetchPypi, numpy, pydantic, pint, - networkx, pytestrunner, pytestcov, pytest +{ buildPythonPackage, lib, fetchPypi, fetchpatch, numpy +, pydantic, pint, networkx, pytestrunner, pytestcov, pytest } : buildPythonPackage rec { @@ -14,10 +14,25 @@ buildPythonPackage rec { sha256 = "141vw36fmacj897q26kq2bl9l0d23lyqjfry6q46aa9087dcs7ni"; }; + # FIXME: Fixed upstream but not released yet. Nevertheless critical for correct behaviour. + # See https://github.com/MolSSI/QCElemental/pull/265 + patches = [ + (fetchpatch { + name = "SearchPath1.patch"; + url = "https://github.com/MolSSI/QCElemental/commit/2211a4e59690bcb14265a60f199a5efe74fe44db.diff"; + sha256 = "1ibjvmdrc103jdj79xrr11y5yji5hc966rm4ihfhfzgbvfkbjg2l"; + }) + (fetchpatch { + name = "SearchPath2.patch"; + url = "https://github.com/MolSSI/QCElemental/commit/5a32ce33e8142047b0a00d0036621fe2750e872a.diff"; + sha256 = "0gmg70vdps7k6alqclwdlxkli9d8s1fphbdvyl8wy8xrh46jw6rk"; + }) + ]; + doCheck = true; meta = with lib; { - description = "Periodic table, physical constants, and molecule parsing for quantum chemistry."; + description = "Periodic table, physical constants, and molecule parsing for quantum chemistry"; homepage = "http://docs.qcarchive.molssi.org/projects/qcelemental/en/latest/"; license = licenses.bsd3; platforms = platforms.linux;