feat: package python cli
This commit is contained in:
parent
b60be21d5c
commit
9b4e87af6f
4 changed files with 40 additions and 1 deletions
|
@ -4,6 +4,7 @@
|
|||
pkgs ? import nixpkgs { overlays = [ (import ./overlay.nix) ]; },
|
||||
}:
|
||||
rec {
|
||||
inherit pkgs;
|
||||
shell = pkgs.mkShell {
|
||||
packages = [
|
||||
python
|
||||
|
|
|
@ -4,4 +4,5 @@ final: prev: {
|
|||
uptime-kuma-api = python-self.callPackage ./uptime-kuma-api.nix { };
|
||||
};
|
||||
};
|
||||
statelessUptimeKuma = final.callPackage ./stateless-uptime-kuma.nix { };
|
||||
}
|
||||
|
|
|
@ -17,10 +17,16 @@ classifiers = [
|
|||
]
|
||||
dependencies = [
|
||||
"uptime-kuma-api",
|
||||
"requests",
|
||||
"click",
|
||||
"click-log",
|
||||
]
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["stateless_uptime_kuma"]
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://git.dgnum.eu/mdebray/stateless-uptime-kuma"
|
||||
|
||||
[project.scripts]
|
||||
stateless_uptime_kuma = "cli:main"
|
||||
stateless-uptime-kuma = "stateless_uptime_kuma.cli:cli"
|
||||
|
|
31
stateless-uptime-kuma.nix
Normal file
31
stateless-uptime-kuma.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ lib, python3 }:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "stateless-uptime-kuma";
|
||||
version = "unstable";
|
||||
pyproject = true;
|
||||
|
||||
src =
|
||||
with lib.fileset;
|
||||
toSource {
|
||||
root = ./.;
|
||||
fileset = difference (intersection (gitTracked ./.) (
|
||||
fileFilter (file: !file.hasExt "nix") ./.
|
||||
)) ./tests;
|
||||
};
|
||||
|
||||
nativeBuildInputs = with python3.pkgs; [ hatchling ];
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
uptime-kuma-api
|
||||
requests
|
||||
click
|
||||
click-log
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A python tool to create uptime-kuma probes";
|
||||
license = licenses.eupl12;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue