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 Sep 23, 2024
1 parent 685cc7d commit 5945008
Show file tree
Hide file tree
Showing 2 changed files with 36 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/
35 changes: 35 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
let
pkgs = import (
builtins.fetchTarball {
name = "nixos-unstable-2024-06-05";
url = "https://github.com/nixos/nixpkgs/archive/57610d2f8f0937f39dbd72251e9614b1561942d8.tar.gz";
sha256 = "0k8az8vmfdk1n8xlza252sqk0hm1hfc7g67adin6jxqaab2s34n9";
}
) {};
poetry2nix =
import (
builtins.fetchTarball {
name = "poetry2nix-2024.6.557458";
url = "https://github.com/nix-community/poetry2nix/archive/81662ae1ad31491eae3bb1d976fb74c71853bc63.tar.gz";
sha256 = "1zvlhzlc7mxr74qii3mkyn4iyd5rdivrm40yf7r7jvj9ry5gnbx9";
}
) {
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 5945008

Please sign in to comment.