From 69b4904bb616e0433aaf227af7c33bc03f2f025a Mon Sep 17 00:00:00 2001 From: Lillian-Violet Date: Thu, 25 Apr 2024 12:49:16 +0200 Subject: [PATCH] Update jupyter to include the venvDir --- jupyter/flake.nix | 70 +++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 36 deletions(-) diff --git a/jupyter/flake.nix b/jupyter/flake.nix index cd9bdc3..cb8b521 100644 --- a/jupyter/flake.nix +++ b/jupyter/flake.nix @@ -3,40 +3,38 @@ 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 - venvShellHook - 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 { + venvDir = "venv"; + packages = with pkgs; + [python311 virtualenv] + ++ (with pkgs.python311Packages; [ + pip + venvShellHook + requests + jupyter + pandas + numpy + matplotlib + seaborn + scikit-learn + plotnine + arrow + polars + pyarrow + ]); + }; + }); + }; }