tblite: init at 0.3.0

tblite: inherit attributes of python derivation from parent


tblite: pass meson and tblite explicitly from pkgs to callPackage
This commit is contained in:
Phillip Seeber 2023-03-16 14:41:22 +01:00
parent c9a3d20cfd
commit 6e16f9d825
4 changed files with 94 additions and 0 deletions

View file

@ -0,0 +1,59 @@
{ stdenv
, lib
, fetchFromGitHub
, cmake
, gfortran
, blas
, lapack
, mctc-lib
, mstore
, toml-f
, multicharge
, dftd4
, simple-dftd3
}:
assert !blas.isILP64 && !lapack.isILP64;
stdenv.mkDerivation rec {
pname = "tblite";
version = "0.3.0";
src = fetchFromGitHub {
owner = "tblite";
repo = pname;
rev = "v${version}";
hash = "sha256-R7CAFG/x55k5Ieslxeq+DWq1wPip4cI+Yvn1cBbeVNs=";
};
nativeBuildInputs = [ cmake gfortran ];
buildInputs = [
blas
lapack
mctc-lib
mstore
toml-f
multicharge
dftd4
simple-dftd3
];
doCheck = true;
preCheck = ''
export OMP_NUM_THREADS=2
'';
postInstall = ''
substituteInPlace $out/lib/pkgconfig/${pname}.pc \
--replace "''${prefix}" ""
'';
meta = with lib; {
description = "Light-weight tight-binding framework";
license = with licenses; [ gpl3Plus lgpl3Plus ];
homepage = "https://github.com/tblite/tblite";
platforms = platforms.linux;
maintainers = [ maintainers.sheepforce ];
};
}

View file

@ -0,0 +1,28 @@
{ buildPythonPackage
, meson
, ninja
, pkg-config
, tblite
, cffi
}:
buildPythonPackage rec {
inherit (tblite) pname version src meta;
nativeBuildInputs = [ meson ninja pkg-config ];
buildInputs = [ tblite ];
propagatedBuildInputs = [ cffi ];
format = "other";
configurePhase = ''
runHook preConfigure
meson setup build python --prefix=$out
cd build
runHook postConfigure
'';
}

View file

@ -22431,6 +22431,8 @@ with pkgs;
simple-dftd3 = callPackage ../development/libraries/science/chemistry/simple-dftd3 { };
tblite = callPackage ../development/libraries/science/chemistry/tblite { };
## libGL/libGLU/Mesa stuff
# Default libGL implementation, should provide headers and

View file

@ -11443,6 +11443,11 @@ self: super: with self; {
tblib = callPackage ../development/python-modules/tblib { };
tblite = callPackage ../development/libraries/science/chemistry/tblite/python.nix {
tblite = pkgs.tblite;
meson = pkgs.meson;
};
tbm-utils = callPackage ../development/python-modules/tbm-utils { };
tcolorpy = callPackage ../development/python-modules/tcolorpy { };