From 2f8ae06aeb8c57be820e03104cb74c72c93ba079 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Thu, 15 Feb 2024 20:35:27 +0100 Subject: [PATCH] [sage] Fix working jupyterlab --- notebook/sagemath/flake.lock | 61 ++++++++++++++++++++++++++++++++++++ notebook/sagemath/flake.nix | 14 ++------- 2 files changed, 63 insertions(+), 12 deletions(-) create mode 100644 notebook/sagemath/flake.lock diff --git a/notebook/sagemath/flake.lock b/notebook/sagemath/flake.lock new file mode 100644 index 0000000..aa51e81 --- /dev/null +++ b/notebook/sagemath/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1707956935, + "narHash": "sha256-ZL2TrjVsiFNKOYwYQozpbvQSwvtV/3Me7Zwhmdsfyu4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a4d4fe8c5002202493e87ec8dbc91335ff55552c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/notebook/sagemath/flake.nix b/notebook/sagemath/flake.nix index e7223bf..a00a43f 100644 --- a/notebook/sagemath/flake.nix +++ b/notebook/sagemath/flake.nix @@ -1,7 +1,7 @@ { description = "Sagemath flake"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; inputs.flake-utils.url = "github:numtide/flake-utils"; outputs = { self, nixpkgs, flake-utils}: @@ -10,25 +10,15 @@ let pkgs = import nixpkgs { inherit system; - config.allowUnfree = true; }; - python-packages = ps: with ps; [ - jupyterlab - jupyterlab-git - jupyterlab-lsp - jupyterlab-widgets - ]; in { devShells.default = pkgs.mkShell { buildInputs = with pkgs; [ sage - (python311.withPackages python-packages) ]; shellHook = '' - # sage --nodotsage -n --notebook-dir . - # TODO sage --nodotsage -n=jupyterlab --notebook-dir . - # exit + sage --nodotsage -n=jupyterlab --notebook-dir . ''; }; }