-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cppe: move pytestCheckHook to checkInputs cppe: hash cppe: license and hash cppe: formatting python3.pkgs.cppe: more tests cppe: formatting cppe: formatting cppe: platforms cppe: platforms
- Loading branch information
1 parent
a6a5114
commit 938a9e0
Showing
4 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
pkgs/development/libraries/science/chemistry/cppe/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ stdenv, lib, fetchFromGitHub, cmake }: | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "cppe"; | ||
version = "0.3.1"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "maxscheurer"; | ||
repo = pname; | ||
rev = "v${version}"; | ||
sha256 = "sha256-guM7+ZWDJLcAUJtPkKLvC4LYSA2eBvER7cgwPZ7FxHw="; | ||
}; | ||
|
||
nativeBuildInputs = [ cmake ]; | ||
|
||
cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" ]; | ||
|
||
meta = with lib; { | ||
description = "C++ and Python library for Polarizable Embedding"; | ||
homepage = "https://github.com/maxscheurer/cppe"; | ||
license = licenses.lgpl3Only; | ||
platforms = platforms.unix; | ||
maintainers = [ maintainers.sheepforce ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ buildPythonPackage | ||
, lib | ||
, cmake | ||
, cppe | ||
, eigen | ||
, python | ||
, pybind11 | ||
, numpy | ||
, h5py | ||
, numba | ||
, scipy | ||
, pandas | ||
, polarizationsolver | ||
, pytest | ||
}: | ||
|
||
buildPythonPackage rec { | ||
inherit (cppe) pname version src meta; | ||
|
||
# The python interface requires eigen3, but builds from a checkout in tree. | ||
# Using the nixpkgs version instead. | ||
postPatch = '' | ||
substituteInPlace setup.py \ | ||
--replace "external/eigen3" "${eigen}/include/eigen3" | ||
''; | ||
|
||
nativeBuildInputs = [ | ||
cmake | ||
eigen | ||
]; | ||
|
||
dontUseCmakeConfigure = true; | ||
|
||
buildInputs = [ pybind11 ]; | ||
|
||
checkInputs = [ | ||
pytest | ||
h5py | ||
numba | ||
numpy | ||
pandas | ||
polarizationsolver | ||
scipy | ||
]; | ||
|
||
pythonImportsCheck = [ "cppe" ]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters