[sage] Fix working jupyterlab

This commit is contained in:
Tibo De Peuter 2024-02-15 20:35:27 +01:00
parent 57f530c0a9
commit 2f8ae06aeb
2 changed files with 63 additions and 12 deletions

View file

@ -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
}

View file

@ -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 .
'';
};
}