simple-dftd3: build with meson, expand platforms to all linux
This commit is contained in:
parent
760faab4ec
commit
1ba8e8ae66
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue