openems: fix for CMake v4 + clean

This commit is contained in:
Guilhem Saurel
2025-10-20 23:42:23 +02:00
parent 4ce0165338
commit e6db9fb932

View File

@@ -2,6 +2,7 @@
stdenv, stdenv,
lib, lib,
fetchFromGitHub, fetchFromGitHub,
fetchpatch,
csxcad, csxcad,
fparser, fparser,
tinyxml, tinyxml,
@@ -19,17 +20,32 @@
hyp2mat, hyp2mat,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: {
pname = "openems"; pname = "openems";
version = "0.0.36"; version = "0.0.36";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "thliebig"; owner = "thliebig";
repo = "openEMS"; repo = "openEMS";
rev = "v${version}"; rev = "v${finalAttrs.version}";
sha256 = "sha256-wdH+Zw7G2ZigzBMX8p3GKdFVx/AhbTNL+P3w+YjI/dc="; sha256 = "sha256-wdH+Zw7G2ZigzBMX8p3GKdFVx/AhbTNL+P3w+YjI/dc=";
}; };
patches = [
# ref. https://github.com/thliebig/openEMS/pull/183 merged upstream
(fetchpatch {
name = "update-cmake-minimum-required.patch";
url = "https://github.com/thliebig/openEMS/commit/0fa7ba3aebc8ee531077973cfa136ead8e887872.patch";
hash = "sha256-q/ax7MZHwqSKAjx22uyV13YO/TXZa4bwikoQyItMB7E=";
})
# ref. https://github.com/thliebig/openEMS/pull/184 merged upstream
(fetchpatch {
name = "update-nf2ff-cmake-minimum-required.patch";
url = "https://github.com/thliebig/openEMS/commit/e02e2a8414355482145240e4c2b2464d7a26dd9e.patch";
hash = "sha256-y3pvim/8XUKF5k7shj0D+8P6tdfSZ3E/gxTogbRtxdo=";
})
];
nativeBuildInputs = [ nativeBuildInputs = [
cmake cmake
]; ];
@@ -60,11 +76,11 @@ stdenv.mkDerivation rec {
-o $out/share/openEMS/matlab/h5readatt_octave.oct -o $out/share/openEMS/matlab/h5readatt_octave.oct
''; '';
meta = with lib; { meta = {
description = "Open Source Electromagnetic Field Solver"; description = "Open Source Electromagnetic Field Solver";
homepage = "https://wiki.openems.de/index.php/Main_Page.html"; homepage = "https://wiki.openems.de/index.php/Main_Page.html";
license = licenses.gpl3; license = lib.licenses.gpl3;
maintainers = with maintainers; [ matthuszagh ]; maintainers = with lib.maintainers; [ matthuszagh ];
platforms = platforms.linux; platforms = lib.platforms.linux;
}; };
} })