Skip to content

Commit

Permalink
add jupyter
Browse files Browse the repository at this point in the history
  • Loading branch information
argonarch committed Sep 5, 2024
1 parent b791b80 commit c5c491c
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 0 deletions.
1 change: 1 addition & 0 deletions jupyter/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
25 changes: 25 additions & 0 deletions jupyter/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions jupyter/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
description = "A Nix-flake-based Python development environment";

inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";

outputs = {
self,
nixpkgs,
}: let
supportedSystems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
forEachSupportedSystem = f:
nixpkgs.lib.genAttrs supportedSystems (system:
f {
pkgs = import nixpkgs {inherit system;};
});
in {
devShells = forEachSupportedSystem ({pkgs}: {
default = pkgs.mkShell {
venvDir = ".venv";
packages = with pkgs;
[python311]
++ (with pkgs.python311Packages; [
pip
venvShellHook
ipykernel
])
++ (with pkgs; [poetry]);
};
});
};
}
14 changes: 14 additions & 0 deletions jupyter/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[tool.poetry]
name = "sample-project"
version = "0.1.0"
description = ""
authors = ["user <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.11"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

0 comments on commit c5c491c

Please sign in to comment.