Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
71 lines
1.4 KiB
Nix
71 lines
1.4 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
fetchFromGitHub,
|
|
csxcad,
|
|
fparser,
|
|
tinyxml,
|
|
hdf5,
|
|
vtk,
|
|
boost,
|
|
zlib,
|
|
cmake,
|
|
octave,
|
|
mpi,
|
|
withQcsxcad ? true,
|
|
withMPI ? false,
|
|
withHyp2mat ? true,
|
|
qcsxcad,
|
|
hyp2mat,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "openems";
|
|
version = "0.0.36";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "thliebig";
|
|
repo = "openEMS";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-wdH+Zw7G2ZigzBMX8p3GKdFVx/AhbTNL+P3w+YjI/dc=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
];
|
|
|
|
cmakeFlags = lib.optionals withMPI [ "-DWITH_MPI=ON" ];
|
|
|
|
buildInputs = [
|
|
fparser
|
|
tinyxml
|
|
hdf5
|
|
vtk
|
|
boost
|
|
zlib
|
|
csxcad
|
|
(octave.override { inherit hdf5; })
|
|
]
|
|
++ lib.optionals withQcsxcad [ qcsxcad ]
|
|
++ lib.optionals withMPI [ mpi ]
|
|
++ lib.optionals withHyp2mat [ hyp2mat ];
|
|
|
|
postFixup = ''
|
|
substituteInPlace $out/share/openEMS/matlab/setup.m \
|
|
--replace /usr/lib ${hdf5}/lib \
|
|
--replace /usr/include ${hdf5}/include
|
|
|
|
${octave}/bin/mkoctfile -L${hdf5}/lib -I${hdf5}/include \
|
|
-lhdf5 $out/share/openEMS/matlab/h5readatt_octave.cc \
|
|
-o $out/share/openEMS/matlab/h5readatt_octave.oct
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Open Source Electromagnetic Field Solver";
|
|
homepage = "https://wiki.openems.de/index.php/Main_Page.html";
|
|
license = licenses.gpl3;
|
|
maintainers = with maintainers; [ matthuszagh ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|