WIP templates for jupyter and new python package

This commit is contained in:
Evie Litherland-Smith 2023-03-31 17:06:44 +01:00
parent 7b35953772
commit 921bb5d326
2 changed files with 48 additions and 0 deletions

18
templates/indica.nix Normal file
View file

@ -0,0 +1,18 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.stdenv.mkDerivation {
pname = "indica-notebook";
version = "1.0.0";
buildInputs = with pkgs; [
(python39.withPackages (ps: with ps; [
jupyter
]))
];
configurePhase = '''';
buildPhase = '''';
installPhase = '''';
}

30
templates/jupyter.nix Normal file
View file

@ -0,0 +1,30 @@
{ tinypkgs ? import
(fetchTarball {
url = "https://gitlab.inria.fr/nix-tutorial/packages-repository/-/archive/master/packages-repository-8e43243635cd8f28c7213205b08c12f2ca2ac74d.tar.gz";
sha256 = "sha256:09l2w3m1z0308zc476ci0bsz5amm536hj1n9xzpwcjm59jxkqpqa";
})
{ }
}:
with tinypkgs; # Put tinypkgs's attributes in the current scope.
with pkgs; # Same for pkgs.
mkShell {
buildInputs = [
chord
# Defines a python + set of packages.
(python3.withPackages (ps: with ps; with python3Packages; [
jupyter
ipython
# Uncomment the following lines to make them available in the shell.
# pandas
# numpy
# matplotlib
]))
];
# Automatically run jupyter when entering the shell.
shellHook = "jupyter notebook";
}