From ab755c86bf782c5664968401146f29fc1944c966 Mon Sep 17 00:00:00 2001 From: Lillian-Violet Date: Thu, 25 Apr 2024 12:26:50 +0200 Subject: [PATCH] Add venvshellhook to jupyter --- jupyter/flake.nix | 55 ++++++++++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 22 deletions(-) diff --git a/jupyter/flake.nix b/jupyter/flake.nix index fe7668a..f273eba 100644 --- a/jupyter/flake.nix +++ b/jupyter/flake.nix @@ -3,26 +3,37 @@ inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz"; - outputs = - { self - , nixpkgs - , - }: - let - supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; - forEachSupportedSystem = f: - nixpkgs.lib.genAttrs supportedSystems (system: - f { - pkgs = import nixpkgs { inherit system; }; - }); - in - { - devShells = forEachSupportedSystem ({ pkgs }: { - default = pkgs.mkShell { - packages = with pkgs; - [ python311 virtualenv ] - ++ (with pkgs.python311Packages; [ pip requests jupyter pandas numpy matplotlib seaborn scikit-learn plotnine arrow polars pyarrow ]); - }; - }); - }; + outputs = { + self, + nixpkgs, + }: let + supportedSystems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"]; + forEachSupportedSystem = f: + nixpkgs.lib.genAttrs supportedSystems (system: + f { + pkgs = import nixpkgs {inherit system;}; + }); + in { + devShells = forEachSupportedSystem ({pkgs}: { + default = pkgs.mkShell { + packages = with pkgs; + [python311 virtualenv] + ++ (with pkgs.python311Packages; [ + pip + venvShellHook + requests + jupyter + pandas + numpy + matplotlib + seaborn + scikit-learn + plotnine + arrow + polars + pyarrow + ]); + }; + }); + }; }