Merge pull request #299273 from NickCao/toml-f
xTB ecosystem: build with meson, fix (cross) compilation
This commit is contained in:
commit
9240e01b0f
@ -1,8 +1,11 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, gfortran
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, python3
|
||||
, blas
|
||||
, lapack
|
||||
, mctc-lib
|
||||
@ -23,23 +26,20 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-VIV9953hx0MZupOARdH+P1h7JtZeJmTlqtO8si+lwdU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake gfortran ];
|
||||
nativeBuildInputs = [ gfortran meson ninja pkg-config python3 ];
|
||||
|
||||
buildInputs = [ blas lapack mctc-lib mstore multicharge ];
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
# Fix the Pkg-Config files for doubled store paths
|
||||
doCheck = true;
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace config/template.pc \
|
||||
--replace "\''${prefix}/" ""
|
||||
patchShebangs --build \
|
||||
config/install-mod.py \
|
||||
app/tester.py
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
preCheck = ''
|
||||
export OMP_NUM_THREADS=2
|
||||
'';
|
||||
|
@ -2,9 +2,11 @@
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, gfortran
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, python3
|
||||
, json-fortran
|
||||
, cmake
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -18,24 +20,18 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-AXjg/ZsitdDf9fNoGVmVal1iZ4/sxjJb7A9W4yye/rg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ gfortran pkg-config cmake ];
|
||||
nativeBuildInputs = [ gfortran meson ninja pkg-config python3 ];
|
||||
|
||||
buildInputs = [ json-fortran ];
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
# Fix the Pkg-Config files for doubled store paths
|
||||
postPatch = ''
|
||||
substituteInPlace config/template.pc \
|
||||
--replace "\''${prefix}/" ""
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs --build config/install-mod.py
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Modular computation tool chain library";
|
||||
mainProgram = "mctc-convert";
|
||||
|
@ -1,8 +1,11 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, gfortran
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, python3
|
||||
, mctc-lib
|
||||
}:
|
||||
|
||||
@ -17,22 +20,16 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-dN2BulLS/ENRFVdJIrZRxgBV8S4d5+7BjTCGnhBbf4I=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake gfortran ];
|
||||
nativeBuildInputs = [ gfortran meson ninja pkg-config python3 ];
|
||||
|
||||
buildInputs = [ mctc-lib ];
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
# Fix the Pkg-Config files for doubled store paths
|
||||
postPatch = ''
|
||||
substituteInPlace config/template.pc \
|
||||
--replace "\''${prefix}/" ""
|
||||
patchShebangs --build config/install-mod.py
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Molecular structure store for testing";
|
||||
license = licenses.asl20;
|
||||
|
@ -1,8 +1,12 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, fetchpatch2
|
||||
, gfortran
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, python3
|
||||
, blas
|
||||
, lapack
|
||||
, mctc-lib
|
||||
@ -22,23 +26,28 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-oUI5x5/Gd0EZBb1w+0jlJUF9X51FnkHFu8H7KctqXl0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake gfortran ];
|
||||
patches = [
|
||||
# Fix finding of MKL for Intel 2021 and newer
|
||||
# Also fix finding mstore
|
||||
# https://github.com/grimme-lab/multicharge/pull/20
|
||||
(fetchpatch2 {
|
||||
url = "https://github.com/grimme-lab/multicharge/commit/98a11ac524cd2a1bd9e2aeb8f4429adb2d76ee8.patch";
|
||||
hash = "sha256-zZ2pcbyaHjN2ZxpMhlqUtIXImrVsLk/8WIcb9IYPgBw=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ gfortran meson ninja pkg-config python3 ];
|
||||
|
||||
buildInputs = [ blas lapack mctc-lib mstore ];
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
# Fix the Pkg-Config files for doubled store paths
|
||||
doCheck = true;
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace config/template.pc \
|
||||
--replace "\''${prefix}/" ""
|
||||
patchShebangs --build config/install-mod.py
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
preCheck = ''
|
||||
export OMP_NUM_THREADS=2
|
||||
'';
|
||||
|
@ -2,7 +2,9 @@
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, gfortran
|
||||
, cmake
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, mctc-lib
|
||||
, mstore
|
||||
, toml-f
|
||||
@ -22,21 +24,12 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-dfXiKKCGJ69aExSKpVC3Bp//COy256R9PDyxCNmDsfo=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake gfortran ];
|
||||
nativeBuildInputs = [ gfortran meson ninja pkg-config ];
|
||||
|
||||
buildInputs = [ mctc-lib mstore toml-f blas ];
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
# Fix the Pkg-Config files for doubled store paths
|
||||
postPatch = ''
|
||||
substituteInPlace config/template.pc \
|
||||
--replace "\''${prefix}/" ""
|
||||
'';
|
||||
cmakeFlags = [
|
||||
"-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
preCheck = ''
|
||||
export OMP_NUM_THREADS=2
|
||||
@ -47,7 +40,7 @@ stdenv.mkDerivation rec {
|
||||
mainProgram = "s-dftd3";
|
||||
license = with licenses; [ lgpl3Only gpl3Only ];
|
||||
homepage = "https://github.com/dftd3/simple-dftd3";
|
||||
platforms = [ "x86_64-linux" ];
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.sheepforce ];
|
||||
};
|
||||
}
|
||||
|
@ -2,8 +2,10 @@
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, cmake
|
||||
, gfortran
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, blas
|
||||
, lapack
|
||||
, mctc-lib
|
||||
@ -35,13 +37,12 @@ stdenv.mkDerivation rec {
|
||||
})
|
||||
];
|
||||
|
||||
# Fix the Pkg-Config files for doubled store paths
|
||||
postPatch = ''
|
||||
substituteInPlace config/template.pc \
|
||||
--replace "\''${prefix}/" ""
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake gfortran ];
|
||||
nativeBuildInputs = [
|
||||
gfortran
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
blas
|
||||
@ -56,10 +57,6 @@ stdenv.mkDerivation rec {
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
preCheck = ''
|
||||
export OMP_NUM_THREADS=2
|
||||
|
@ -1,4 +1,6 @@
|
||||
{ buildPythonPackage
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, pythonAtLeast
|
||||
, fetchpatch
|
||||
, meson
|
||||
, ninja
|
||||
@ -15,6 +17,7 @@
|
||||
, toml-f
|
||||
, multicharge
|
||||
, dftd4
|
||||
, setuptools
|
||||
}:
|
||||
|
||||
buildPythonPackage {
|
||||
@ -27,6 +30,8 @@ buildPythonPackage {
|
||||
pkg-config
|
||||
gfortran
|
||||
mctc-lib
|
||||
] ++ lib.optionals (pythonAtLeast "3.12") [
|
||||
setuptools
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, lib, fetchFromGitHub, gfortran, cmake }:
|
||||
{ stdenv, lib, fetchFromGitHub, gfortran, meson, ninja, mesonEmulatorHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "test-drive";
|
||||
@ -11,21 +11,18 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-ObAnHFP1Hp0knf/jtGHynVF0CCqK47eqetePx4NLmlM=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace config/template.pc \
|
||||
--replace 'libdir=''${prefix}/@CMAKE_INSTALL_LIBDIR@' "libdir=@CMAKE_INSTALL_LIBDIR@" \
|
||||
--replace 'includedir=''${prefix}/@CMAKE_INSTALL_INCLUDEDIR@' "includedir=@CMAKE_INSTALL_INCLUDEDIR@"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
gfortran
|
||||
cmake
|
||||
meson
|
||||
ninja
|
||||
] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
||||
mesonEmulatorHook
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Procedural Fortran testing framework";
|
||||
homepage = "https://github.com/fortran-lang/test-drive";
|
||||
license = with licenses; [ asl20 mit ] ;
|
||||
license = with licenses; [ asl20 mit ];
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.sheepforce ];
|
||||
};
|
||||
|
@ -2,7 +2,9 @@
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, gfortran
|
||||
, cmake
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, test-drive
|
||||
}:
|
||||
|
||||
@ -17,29 +19,19 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-+cac4rUNpd2w3yBdH1XoCKdJ9IgOHZioZg8AhzGY0FE=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ gfortran cmake ];
|
||||
nativeBuildInputs = [ gfortran meson ninja pkg-config ];
|
||||
|
||||
buildInputs = [ test-drive ];
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
# Fix the Pkg-Config files for doubled store paths
|
||||
postPatch = ''
|
||||
substituteInPlace config/template.pc \
|
||||
--replace "\''${prefix}/" ""
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "TOML parser implementation for data serialization and deserialization in Fortran";
|
||||
license = with licenses; [ asl20 mit ];
|
||||
homepage = "https://github.com/toml-f/toml-f";
|
||||
platforms = [ "x86_64-linux" ];
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.sheepforce ];
|
||||
};
|
||||
}
|
||||
|
@ -84,6 +84,7 @@ buildPythonPackage rec {
|
||||
"test_n3_cis_ewald"
|
||||
"test_veff"
|
||||
"test_collinear_kgks_gga"
|
||||
"test_libxc_gga_deriv4"
|
||||
];
|
||||
|
||||
pytestFlagsArray = [
|
||||
|
Loading…
Reference in New Issue
Block a user