Something went wrong. Try again.
lol
Something went wrong. Try again.
993 B · 62 lines
Nix
at master
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263{ buildPythonPackage, lib, stdenv, cmake, cppe, eigen, pybind11, numpy, h5py, numba, scipy, pandas, polarizationsolver, pytest, llvmPackages,}:
buildPythonPackage { 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;
format = "setuptools";
buildInputs = [ pybind11 ] ++ lib.optional stdenv.cc.isClang llvmPackages.openmp;
env = lib.optionalAttrs stdenv.cc.isClang { NIX_CFLAGS_LINK = "-lomp"; };
hardeningDisable = lib.optional stdenv.cc.isClang "strictoverflow";
nativeCheckInputs = [ pytest h5py numba numpy pandas polarizationsolver scipy ];
pythonImportsCheck = [ "cppe" ];}