mctc-lib: build with meson
This commit is contained in:
parent
cf7071bff3
commit
14e08254a2
|
@ -2,9 +2,11 @@
|
||||||
, lib
|
, lib
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, gfortran
|
, gfortran
|
||||||
|
, meson
|
||||||
|
, ninja
|
||||||
, pkg-config
|
, pkg-config
|
||||||
|
, python3
|
||||||
, json-fortran
|
, json-fortran
|
||||||
, cmake
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
@ -18,24 +20,18 @@ stdenv.mkDerivation rec {
|
||||||
hash = "sha256-AXjg/ZsitdDf9fNoGVmVal1iZ4/sxjJb7A9W4yye/rg=";
|
hash = "sha256-AXjg/ZsitdDf9fNoGVmVal1iZ4/sxjJb7A9W4yye/rg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ gfortran pkg-config cmake ];
|
nativeBuildInputs = [ gfortran meson ninja pkg-config python3 ];
|
||||||
|
|
||||||
buildInputs = [ json-fortran ];
|
buildInputs = [ json-fortran ];
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
patchShebangs --build config/install-mod.py
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Modular computation tool chain library";
|
description = "Modular computation tool chain library";
|
||||||
mainProgram = "mctc-convert";
|
mainProgram = "mctc-convert";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user