From 9a064bc1819c235676673e077521df0136840880 Mon Sep 17 00:00:00 2001 From: Phillip Seeber Date: Wed, 9 Jun 2021 17:20:06 +0200 Subject: [PATCH] meep: init 1.18.0 --- default.nix | 2 ++ pkgs/apps/meep/default.nix | 53 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 pkgs/apps/meep/default.nix diff --git a/default.nix b/default.nix index c128890f..e48588cb 100644 --- a/default.nix +++ b/default.nix @@ -158,6 +158,8 @@ let mctdh = callPackage ./pkgs/apps/mctdh { }; + meep = callPackage ./pkgs/apps/meep { }; + mesa-qc = callPackage ./pkgs/apps/mesa { gfortran = final.gfortran6; }; diff --git a/pkgs/apps/meep/default.nix b/pkgs/apps/meep/default.nix new file mode 100644 index 00000000..9404a429 --- /dev/null +++ b/pkgs/apps/meep/default.nix @@ -0,0 +1,53 @@ +{ stdenv, lib, fetchFromGitHub, autoreconfHook, gfortran, blas, lapack, fftw, hdf5-full +, pkg-config, mpi, python3, harminv, libctl, libGDSII +} : + +stdenv.mkDerivation rec { + pname = "meep"; + version = "1.18.0"; + + src = fetchFromGitHub { + owner = "NanoComp"; + repo = pname; + rev = "v${version}"; + sha256= "08l4mczkh08dp90c4dlnyx6lsg093li0xqnnbh7q8k363cr8lx81"; + }; + + nativeBuildInputs = [ + autoreconfHook + gfortran + pkg-config + ]; + + buildInputs = [ + blas + lapack + fftw + hdf5-full + harminv + libctl + libGDSII + ]; + + propagatedBuildInputs = [ + mpi + python3 + ]; + propagatedUserEnvPkgs = [ mpi ]; + + configureFlags = [ + "--without-libctl" + "--with-mpi" + "--with-openmp" + ]; + + passthru = { inherit mpi; }; + + meta = with lib; { + description = "Free finite-difference time-domain (FDTD) software for electromagnetic simulations"; + homepage = "https://meep.readthedocs.io/en/latest/"; + license = licenses.gpl2Only; + platforms = platforms.linux; + maintainers = [ maintainers.sheepforce ]; + }; +}