simple-dftd3: build with meson, expand platforms to all linux
This commit is contained in:
parent
760faab4ec
commit
1ba8e8ae66
|
@ -2,7 +2,9 @@
|
||||||
, lib
|
, lib
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, gfortran
|
, gfortran
|
||||||
, cmake
|
, meson
|
||||||
|
, ninja
|
||||||
|
, pkg-config
|
||||||
, mctc-lib
|
, mctc-lib
|
||||||
, mstore
|
, mstore
|
||||||
, toml-f
|
, toml-f
|
||||||
|
@ -22,21 +24,12 @@ stdenv.mkDerivation rec {
|
||||||
hash = "sha256-dfXiKKCGJ69aExSKpVC3Bp//COy256R9PDyxCNmDsfo=";
|
hash = "sha256-dfXiKKCGJ69aExSKpVC3Bp//COy256R9PDyxCNmDsfo=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake gfortran ];
|
nativeBuildInputs = [ gfortran meson ninja pkg-config ];
|
||||||
|
|
||||||
buildInputs = [ mctc-lib mstore toml-f blas ];
|
buildInputs = [ mctc-lib mstore toml-f blas ];
|
||||||
|
|
||||||
outputs = [ "out" "dev" ];
|
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;
|
doCheck = true;
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
export OMP_NUM_THREADS=2
|
export OMP_NUM_THREADS=2
|
||||||
|
@ -47,7 +40,7 @@ stdenv.mkDerivation rec {
|
||||||
mainProgram = "s-dftd3";
|
mainProgram = "s-dftd3";
|
||||||
license = with licenses; [ lgpl3Only gpl3Only ];
|
license = with licenses; [ lgpl3Only gpl3Only ];
|
||||||
homepage = "https://github.com/dftd3/simple-dftd3";
|
homepage = "https://github.com/dftd3/simple-dftd3";
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = platforms.linux;
|
||||||
maintainers = [ maintainers.sheepforce ];
|
maintainers = [ maintainers.sheepforce ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user