From 19518cea9468a15fd586083e147a000084b094ec Mon Sep 17 00:00:00 2001 From: Eli Anne Ersdal Date: Tue, 19 May 2026 08:58:31 +0200 Subject: [PATCH] min nix-pakke:) --- .envrc | 1 + shell.nix | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .envrc create mode 100644 shell.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..1d953f4 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use nix diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..96e6611 --- /dev/null +++ b/shell.nix @@ -0,0 +1,37 @@ +with import (fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-25.11") { }; +mkShellNoCC rec { + packages = [ + # Defines a python + set of packages. + (python3.withPackages ( + ps: with ps; [ + jupyter + ipython + pandas + numpy + matplotlib + scipy + netcdf4 + xarray + shapely + + # Uncomment the following lines to make them available in the shell. + # Additional packages can be found with: https://search.nixos.org/packages + # pandas + # numpy + # matplotlib + ] + )) + ]; + + buildInputs = [ + stdenv.cc.cc + netcdf + ]; + + PYTHONPATH = "$PWD"; + #MPLBACKEND = "Agg"; + LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs; + + # Automatically run jupyter when entering the shell. + # shellHook = "jupyter notebook"; +}