Initial setup
This commit is contained in:
commit
9c08272621
6 changed files with 109 additions and 0 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
*.lock
|
||||
*.venv
|
||||
1
README.md
Normal file
1
README.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
# Gardening Automation and Monitoring
|
||||
84
flake.nix
Normal file
84
flake.nix
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
{
|
||||
description = "Gardening Automation and Monitoring";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
pyproject-nix = {
|
||||
url = "github:pyproject-nix/pyproject.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
uv2nix = {
|
||||
url = "github:pyproject-nix/uv2nix";
|
||||
inputs.pyproject-nix.follows = "pyproject-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
pyproject-build-systems = {
|
||||
url = "github:pyproject-nix/build-system-pkgs";
|
||||
inputs.pyproject-nix.follows = "pyproject-nix";
|
||||
inputs.uv2nix.follows = "uv2nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
uv2nix,
|
||||
pyproject-nix,
|
||||
pyproject-build-systems,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (nixpkgs) lib;
|
||||
workspace = uv2nix.lib.workspace.loadWorkspace { workspaceRoot = ./.; };
|
||||
overlay = workspace.mkPyprojectOverlay {
|
||||
sourcePreference = "wheel";
|
||||
};
|
||||
|
||||
pyprojectOverrides = _final: _prev: {
|
||||
};
|
||||
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
|
||||
python = pkgs.python312;
|
||||
|
||||
pythonSet =
|
||||
(pkgs.callPackage pyproject-nix.build.packages {
|
||||
inherit python;
|
||||
}).overrideScope
|
||||
(
|
||||
lib.composeManyExtensions [
|
||||
pyproject-build-systems.overlays.default
|
||||
overlay
|
||||
pyprojectOverrides
|
||||
]
|
||||
);
|
||||
|
||||
in
|
||||
{
|
||||
packages.x86_64-linux.default = pythonSet.mkVirtualEnv "gardening_iot" workspace.deps.default;
|
||||
devShells.x86_64-linux = {
|
||||
impure = pkgs.mkShell {
|
||||
packages = [
|
||||
python
|
||||
pkgs.uv
|
||||
];
|
||||
env =
|
||||
{
|
||||
UV_PYTHON_DOWNLOADS = "never";
|
||||
UV_PYTHON = python.interpreter;
|
||||
}
|
||||
// lib.optionalAttrs pkgs.stdenv.isLinux {
|
||||
LD_LIBRARY_PATH = lib.makeLibraryPath pkgs.pythonManylinuxPackages.manylinux1;
|
||||
};
|
||||
shellHook = ''
|
||||
unset PYTHONPATH
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
5
main.py
Normal file
5
main.py
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
def main():
|
||||
print("hhhello")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
17
pyproject.toml
Normal file
17
pyproject.toml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
[project]
|
||||
name = "gardening_iot"
|
||||
version = "0.1.0"
|
||||
description = "Garden Automation and Monitoring"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.12"
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"ruff>=0.6.7",
|
||||
]
|
||||
0
src/gardening_iot/__init__.py
Normal file
0
src/gardening_iot/__init__.py
Normal file
Loading…
Add table
Add a link
Reference in a new issue