Created
August 4, 2025 18:25
-
-
Save qxrein/951c3b3ed5d8e21f4eba21272fa77d33 to your computer and use it in GitHub Desktop.
nix flake devshell for meep simulator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| description = "Meep devshell"; | |
| inputs = { | |
| nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; | |
| flake-utils.url = "github:numtide/flake-utils"; | |
| }; | |
| outputs = { self, nixpkgs, flake-utils, ... }: | |
| flake-utils.lib.eachDefaultSystem (system: | |
| let | |
| pkgs = import nixpkgs { inherit system; }; | |
| python = pkgs.python311; | |
| pythonPackages = pkgs.python311Packages; | |
| in { | |
| devShells.default = pkgs.mkShell { | |
| packages = with pythonPackages; [ | |
| python | |
| meep | |
| numpy | |
| matplotlib | |
| h5py | |
| pip | |
| setuptools | |
| wheel | |
| ]; | |
| shellHook = '' | |
| export PYTHONPATH="${pythonPackages.meep}/${python.sitePackages}:$PYTHONPATH" | |
| ''; | |
| }; | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment