flakes/notebook/python/flake.nix

32 lines
961 B
Nix
Raw Normal View History

2023-09-25 20:46:35 +02:00
{
description = "Jupyter notebook flake";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils}:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
python-packages = p: with p; [
imageio
jupyter
matplotlib
notebook
numpy
];
in {
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
(python3.withPackages python-packages)
];
shellHook = ''
jupyter notebook ./CIEColorSpaces.ipynb && exit
'';
};
}
);
}