Skip to content

Commit

Permalink
feat: Add Nix support
Browse files Browse the repository at this point in the history
  • Loading branch information
l0b0 committed Mar 21, 2024
1 parent d03c42c commit a56db6c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
*.pyc
__pycache__
/.pytest_cache/
/python
Thumbs.db
/.vscode/
30 changes: 30 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
let
pkgs = import (
builtins.fetchTarball {
url = "https://github.com/nixos/nixpkgs/archive/b06025f1533a1e07b6db3e75151caa155d1c7eb3.tar.gz";
sha256 = "1b8dim6xpcg3wyb0xa0w4h4m22npbzl2np822x4r7wiw5wnnzg5a";
}
) {};
poetry2nix = import (
builtins.fetchTarball {
url = "https://github.com/nix-community/poetry2nix/archive/7df29134065172f24385177ea69e755cb90f196c.tar.gz";
sha256 = "0qx2iv57vhgraaqj4dm9zd3dha1p6ch4n07pja0hsxsymjbvdanw";
}
) {inherit pkgs;};
poetryPackages = poetry2nix.mkPoetryPackages {
projectDir = builtins.path {
path = ./.;
name = "python-linz-logger";
};
};
in
pkgs.mkShell {
packages = [
pkgs.bashInteractive
pkgs.poetry
poetryPackages.poetryPackages
];
shellHook = ''
ln --force --no-target-directory --symbolic "${poetryPackages.python}/bin/python" python
'';
}

0 comments on commit a56db6c

Please sign in to comment.