Merge pull request #280045 from sheepforce/fortran-dynamic

fortran tight-binding ecosystem: enable static/dynamic builds depending on hostPlatform

authored by markuskowa and committed by GitHub 952b3d09 cdcd061e

+71 -23
+10 -3
pkgs/development/libraries/science/chemistry/dftd4/default.nix
··· 27 28 buildInputs = [ blas lapack mctc-lib mstore multicharge ]; 29 30 - postInstall = '' 31 - substituteInPlace $out/lib/pkgconfig/${pname}.pc \ 32 - --replace "''${prefix}/" "" 33 ''; 34 35 doCheck = true; 36 preCheck = ''
··· 27 28 buildInputs = [ blas lapack mctc-lib mstore multicharge ]; 29 30 + outputs = [ "out" "dev" ]; 31 + 32 + # Fix the Pkg-Config files for doubled store paths 33 + postPatch = '' 34 + substituteInPlace config/template.pc \ 35 + --replace "\''${prefix}/" "" 36 ''; 37 + 38 + cmakeFlags = [ 39 + "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}" 40 + ]; 41 42 doCheck = true; 43 preCheck = ''
+10 -3
pkgs/development/libraries/science/chemistry/mctc-lib/default.nix
··· 22 23 buildInputs = [ json-fortran ]; 24 25 - postInstall = '' 26 - substituteInPlace $out/lib/pkgconfig/${pname}.pc \ 27 - --replace "''${prefix}/" "" 28 ''; 29 30 doCheck = true; 31
··· 22 23 buildInputs = [ json-fortran ]; 24 25 + outputs = [ "out" "dev" ]; 26 + 27 + # Fix the Pkg-Config files for doubled store paths 28 + postPatch = '' 29 + substituteInPlace config/template.pc \ 30 + --replace "\''${prefix}/" "" 31 ''; 32 + 33 + cmakeFlags = [ 34 + "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}" 35 + ]; 36 37 doCheck = true; 38
+10 -3
pkgs/development/libraries/science/chemistry/mstore/default.nix
··· 21 22 buildInputs = [ mctc-lib ]; 23 24 - postInstall = '' 25 - substituteInPlace $out/lib/pkgconfig/${pname}.pc \ 26 - --replace "''${prefix}/" "" 27 ''; 28 29 meta = with lib; { 30 description = "Molecular structure store for testing";
··· 21 22 buildInputs = [ mctc-lib ]; 23 24 + outputs = [ "out" "dev" ]; 25 + 26 + # Fix the Pkg-Config files for doubled store paths 27 + postPatch = '' 28 + substituteInPlace config/template.pc \ 29 + --replace "\''${prefix}/" "" 30 ''; 31 + 32 + cmakeFlags = [ 33 + "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}" 34 + ]; 35 36 meta = with lib; { 37 description = "Molecular structure store for testing";
+10 -3
pkgs/development/libraries/science/chemistry/multicharge/default.nix
··· 26 27 buildInputs = [ blas lapack mctc-lib mstore ]; 28 29 - postInstall = '' 30 - substituteInPlace $out/lib/pkgconfig/${pname}.pc \ 31 - --replace "''${prefix}/" "" 32 ''; 33 34 doCheck = true; 35 preCheck = ''
··· 26 27 buildInputs = [ blas lapack mctc-lib mstore ]; 28 29 + outputs = [ "out" "dev" ]; 30 + 31 + # Fix the Pkg-Config files for doubled store paths 32 + postPatch = '' 33 + substituteInPlace config/template.pc \ 34 + --replace "\''${prefix}/" "" 35 ''; 36 + 37 + cmakeFlags = [ 38 + "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}" 39 + ]; 40 41 doCheck = true; 42 preCheck = ''
+9 -3
pkgs/development/libraries/science/chemistry/simple-dftd3/default.nix
··· 26 27 buildInputs = [ mctc-lib mstore toml-f blas ]; 28 29 - postInstall = '' 30 - substituteInPlace $out/lib/pkgconfig/s-dftd3.pc \ 31 - --replace "''${prefix}/" "" 32 ''; 33 34 doCheck = true; 35 preCheck = ''
··· 26 27 buildInputs = [ mctc-lib mstore toml-f blas ]; 28 29 + outputs = [ "out" "dev" ]; 30 + 31 + # Fix the Pkg-Config files for doubled store paths 32 + postPatch = '' 33 + substituteInPlace config/template.pc \ 34 + --replace "\''${prefix}/" "" 35 ''; 36 + cmakeFlags = [ 37 + "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}" 38 + ]; 39 40 doCheck = true; 41 preCheck = ''
+12 -5
pkgs/development/libraries/science/chemistry/tblite/default.nix
··· 35 }) 36 ]; 37 38 nativeBuildInputs = [ cmake gfortran ]; 39 40 buildInputs = [ ··· 48 simple-dftd3 49 ]; 50 51 doCheck = true; 52 preCheck = '' 53 export OMP_NUM_THREADS=2 54 - ''; 55 - 56 - postInstall = '' 57 - substituteInPlace $out/lib/pkgconfig/${pname}.pc \ 58 - --replace "''${prefix}" "" 59 ''; 60 61 meta = with lib; {
··· 35 }) 36 ]; 37 38 + # Fix the Pkg-Config files for doubled store paths 39 + postPatch = '' 40 + substituteInPlace config/template.pc \ 41 + --replace "\''${prefix}/" "" 42 + ''; 43 + 44 nativeBuildInputs = [ cmake gfortran ]; 45 46 buildInputs = [ ··· 54 simple-dftd3 55 ]; 56 57 + outputs = [ "out" "dev" ]; 58 + 59 + cmakeFlags = [ 60 + "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}" 61 + ]; 62 + 63 doCheck = true; 64 preCheck = '' 65 export OMP_NUM_THREADS=2 66 ''; 67 68 meta = with lib; {
+10 -3
pkgs/development/libraries/toml-f/default.nix
··· 21 22 buildInputs = [ test-drive ]; 23 24 - postInstall = '' 25 - substituteInPlace $out/lib/pkgconfig/${pname}.pc \ 26 - --replace "''${prefix}/" "" 27 ''; 28 29 doCheck = true; 30
··· 21 22 buildInputs = [ test-drive ]; 23 24 + outputs = [ "out" "dev" ]; 25 + 26 + # Fix the Pkg-Config files for doubled store paths 27 + postPatch = '' 28 + substituteInPlace config/template.pc \ 29 + --replace "\''${prefix}/" "" 30 ''; 31 + 32 + cmakeFlags = [ 33 + "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}" 34 + ]; 35 36 doCheck = true; 37