From c09c961e7532aa746b3b302e836c6f69c8b97a25 Mon Sep 17 00:00:00 2001 From: Hans Kristian Djuve Date: Tue, 17 Mar 2026 12:45:05 +0100 Subject: [PATCH] use python packages listed in this file to run the code. super easy if you are on nix os --- shell.nix | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 shell.nix diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..6739098 --- /dev/null +++ b/shell.nix @@ -0,0 +1,34 @@ +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 + matplotlib + numpy + scipy + pyproj + + # 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 + ]; + + PYTHONPATH = "$PWD"; + #MPLBACKEND = "tkagg"; + LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs; + + # Automatically run jupyter when entering the shell. + # shellHook = "jupyter notebook"; +}