Unverified Commit 541bb38f authored by Wolfgang Walther's avatar Wolfgang Walther Committed by GitHub
Browse files

xnec2c: clean up and improve (#381218)

parents 71272664 ceb84ba4
Loading
Loading
Loading
Loading
+15 −10
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchurl,
  fetchFromGitHub,
  autoreconfHook,
  wrapGAppsHook3,
  pkg-config,
@@ -9,17 +9,20 @@
  gtk3,
  blas,
  lapack,
  nix-update-script,
}:

assert (!blas.isILP64) && (!lapack.isILP64);

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "xnec2c";
  version = "4.4.16";

  src = fetchurl {
    url = "https://www.xnec2c.org/releases/${pname}-v${version}.tar.gz";
    hash = "sha256-XiZi8pfmfHjGpePkRy/pF1TA+5RdxX4AGuKzG5Wqrmk=";
  src = fetchFromGitHub {
    owner = "KJ7LNW";
    repo = "xnec2c";
    tag = "v${finalAttrs.version}";
    hash = "sha256-W8JwbCSXt5cjgncOzV1wltPnJxwWC6B29eaT8emIU9Y=";
  };

  nativeBuildInputs = [
@@ -34,15 +37,17 @@ stdenv.mkDerivation rec {
    lapack
  ];

  meta = with lib; {
  passthru.updateScript = nix-update-script { };

  meta = {
    homepage = "https://www.xnec2c.org/";
    description = "Graphical antenna simulation";
    mainProgram = "xnec2c";
    license = licenses.gpl3;
    maintainers = with maintainers; [ mvs ];
    platforms = platforms.unix;
    license = lib.licenses.gpl3;
    maintainers = with lib.maintainers; [ mvs ];
    platforms = lib.platforms.unix;

    # Darwin support likely to be fixed upstream in the next release
    broken = stdenv.hostPlatform.isDarwin;
  };
}
})