can I at least change the project name? kthxbye

This commit is contained in:
Alex Tau 2025-04-27 21:48:18 +03:00
parent 83a5ff3909
commit 75ff4edeed
3 changed files with 12 additions and 12 deletions

View file

@ -86,13 +86,13 @@
# Package a virtual environment as our main application. # Package a virtual environment as our main application.
# #
# Enable no optional dependencies for production build. # Enable no optional dependencies for production build.
packages.x86_64-linux.default = pythonSet.mkVirtualEnv "hello-world-env" workspace.deps.default; packages.x86_64-linux.default = pythonSet.mkVirtualEnv "lego-monitoring-env" workspace.deps.default;
# Make hello runnable with `nix run` # Make service runnable with `nix run`
apps.x86_64-linux = { apps.x86_64-linux = {
default = { default = {
type = "app"; type = "app";
program = "${self.packages.x86_64-linux.default}/bin/hello"; program = "${self.packages.x86_64-linux.default}/bin/service";
}; };
}; };
@ -147,7 +147,7 @@
# Apply fixups for building an editable package of your workspace packages # Apply fixups for building an editable package of your workspace packages
(final: prev: { (final: prev: {
hello-world = prev.hello-world.overrideAttrs (old: { lego-monitoring = prev.lego-monitoring.overrideAttrs (old: {
# It's a good idea to filter the sources going into an editable build # It's a good idea to filter the sources going into an editable build
# so the editable package doesn't have to be rebuilt on every change. # so the editable package doesn't have to be rebuilt on every change.
src = lib.fileset.toSource { src = lib.fileset.toSource {
@ -155,7 +155,7 @@
fileset = lib.fileset.unions [ fileset = lib.fileset.unions [
(old.src + "/pyproject.toml") (old.src + "/pyproject.toml")
(old.src + "/README.md") (old.src + "/README.md")
(old.src + "/src/hello_world/__init__.py") (old.src + "/src/lego_monitoring/__init__.py")
]; ];
}; };
@ -179,7 +179,7 @@
# Build virtual environment, with local packages being editable. # Build virtual environment, with local packages being editable.
# #
# Enable all optional dependencies for development. # Enable all optional dependencies for development.
virtualenv = editablePythonSet.mkVirtualEnv "hello-world-dev-env" workspace.deps.all; virtualenv = editablePythonSet.mkVirtualEnv "lego-monitoring-dev-env" workspace.deps.all;
in in
pkgs.mkShell { pkgs.mkShell {

View file

@ -1,15 +1,15 @@
[project] [project]
name = "hello-world" name = "lego-monitoring"
version = "0.1.0" version = "0.1.0"
description = "Add your description here" description = "Monitoring software for the lego server"
readme = "README.md" readme = "README.md"
requires-python = ">=3.12" requires-python = ">=3.12"
dependencies = [ dependencies = [
"urllib3>=2.2.3", #"urllib3>=2.2.3",
] ]
[project.scripts] [project.scripts]
hello = "hello_world:hello" service = "lego_monitoring:main"
[build-system] [build-system]
requires = ["hatchling"] requires = ["hatchling"]
@ -17,5 +17,5 @@ build-backend = "hatchling.build"
[dependency-groups] [dependency-groups]
dev = [ dev = [
"ruff>=0.6.7", #"ruff>=0.6.7",
] ]

View file

@ -1,2 +1,2 @@
def hello() -> None: def main() -> None:
print("Hello from hello-world!") print("Hello from hello-world!")