Merge pull request #280045 from sheepforce/fortran-dynamic
fortran tight-binding ecosystem: enable static/dynamic builds depending on hostPlatform
This commit is contained in:
commit
952b3d0971
@ -27,11 +27,18 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [ blas lapack mctc-lib mstore multicharge ];
|
||||
|
||||
postInstall = ''
|
||||
substituteInPlace $out/lib/pkgconfig/${pname}.pc \
|
||||
--replace "''${prefix}/" ""
|
||||
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
|
||||
|
@ -22,11 +22,18 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [ json-fortran ];
|
||||
|
||||
postInstall = ''
|
||||
substituteInPlace $out/lib/pkgconfig/${pname}.pc \
|
||||
--replace "''${prefix}/" ""
|
||||
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; {
|
||||
|
@ -21,11 +21,18 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [ mctc-lib ];
|
||||
|
||||
postInstall = ''
|
||||
substituteInPlace $out/lib/pkgconfig/${pname}.pc \
|
||||
--replace "''${prefix}/" ""
|
||||
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"}"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Molecular structure store for testing";
|
||||
license = licenses.asl20;
|
||||
|
@ -26,11 +26,18 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [ blas lapack mctc-lib mstore ];
|
||||
|
||||
postInstall = ''
|
||||
substituteInPlace $out/lib/pkgconfig/${pname}.pc \
|
||||
--replace "''${prefix}/" ""
|
||||
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
|
||||
|
@ -26,10 +26,16 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [ mctc-lib mstore toml-f blas ];
|
||||
|
||||
postInstall = ''
|
||||
substituteInPlace $out/lib/pkgconfig/s-dftd3.pc \
|
||||
--replace "''${prefix}/" ""
|
||||
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 = ''
|
||||
|
@ -35,6 +35,12 @@ stdenv.mkDerivation rec {
|
||||
})
|
||||
];
|
||||
|
||||
# Fix the Pkg-Config files for doubled store paths
|
||||
postPatch = ''
|
||||
substituteInPlace config/template.pc \
|
||||
--replace "\''${prefix}/" ""
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake gfortran ];
|
||||
|
||||
buildInputs = [
|
||||
@ -48,16 +54,17 @@ stdenv.mkDerivation rec {
|
||||
simple-dftd3
|
||||
];
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
|
||||
];
|
||||
|
||||
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 ];
|
||||
|
@ -21,11 +21,18 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [ test-drive ];
|
||||
|
||||
postInstall = ''
|
||||
substituteInPlace $out/lib/pkgconfig/${pname}.pc \
|
||||
--replace "''${prefix}/" ""
|
||||
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; {
|
||||
|
Loading…
Reference in New Issue
Block a user