diff --git a/jupyter/flake.lock b/jupyter/flake.lock index 2c85ae7..f592509 100644 --- a/jupyter/flake.lock +++ b/jupyter/flake.lock @@ -5,11 +5,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -20,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1717144377, - "narHash": "sha256-F/TKWETwB5RaR8owkPPi+SPJh83AQsm6KrQAlJ8v/uA=", + "lastModified": 1731858824, + "narHash": "sha256-0KhJ6SOyWjx408tsgcoVQFx9nEn55DwrhFbCE49Oyac=", "owner": "nixos", "repo": "nixpkgs", - "rev": "805a384895c696f802a9bf5bf4720f37385df547", + "rev": "7937932921ea34c51c1b586e2505574f6f0be5a7", "type": "github" }, "original": { diff --git a/jupyter/flake.nix b/jupyter/flake.nix index 08a93b6..f015559 100644 --- a/jupyter/flake.nix +++ b/jupyter/flake.nix @@ -8,7 +8,7 @@ outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (sys: let pkgs = import nixpkgs { system = sys; }; - python = pkgs.python310; + python = pkgs.python311; latex = pkgs.texlive.combine { inherit (pkgs.texlive) @@ -28,36 +28,21 @@ ''; }; - jupyter-ihaskell = python.pkgs.buildPythonPackage rec { - name = "jupyter-ihaskell"; - format = "other"; - - unpackPhase = ": 3"; # we don't have any sources - - nativeBuildInputs = [ (python.withPackages (ps: with ps; [ jupyter jupyter-core ])) ]; - - # for some reason, ihaskell wants to create $HOME/.ihaskell - # we set $HOME to $out, and then remove the .ihaskell file - installPhase = '' - mkdir -p $out - HOME=$out ${pkgs.ihaskell}/bin/ihaskell install --prefix=$out - rm -rf $out/.ihaskell - ''; - }; - python-environment = (python.withPackages (ps: with ps; [ - ipympl numpy matplotlib scipy + ipympl numpy matplotlib scipy cvxpy jupyter-core jupyter - jupyter-config jupyter-ihaskell + jupyter-config ])); in rec { packages.latex = latex; packages.python-environment = python-environment; - packages.default = pkgs.writeScriptBin "start-notebook" '' - env PATH=$PATH:${latex}/bin:${pkgs.pandoc}/bin ${python-environment}/bin/jupyter-notebook - ''; + packages.default = pkgs.writeShellApplication { + name = "start-notebook"; + runtimeInputs = [latex pkgs.pandoc python-environment ]; + text = "${python-environment}/bin/jupyter-notebook"; + }; devShells.default = pkgs.mkShell { packages = [ python-environment latex ];