Rename main.py -> cli.py and add poetry pre-commit hooks
Add apps section to flake.nix output to explicitly define CLI output path
This commit is contained in:
parent
b48d53fa2a
commit
c477ec58a9
|
@ -8,6 +8,11 @@ repos:
|
||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
- id: check-yaml
|
- id: check-yaml
|
||||||
- id: check-added-large-files
|
- id: check-added-large-files
|
||||||
|
- repo: https://github.com/python-poetry/poetry
|
||||||
|
rev: "1.8.0" # add version here
|
||||||
|
hooks:
|
||||||
|
- id: poetry-check
|
||||||
|
- id: poetry-lock
|
||||||
- repo: https://github.com/psf/black-pre-commit-mirror
|
- repo: https://github.com/psf/black-pre-commit-mirror
|
||||||
rev: 24.4.2
|
rev: 24.4.2
|
||||||
hooks:
|
hooks:
|
||||||
|
|
12
flake.nix
12
flake.nix
|
@ -16,7 +16,17 @@
|
||||||
packages = forAllSystems (system: let
|
packages = forAllSystems (system: let
|
||||||
inherit (poetry2nix.lib.mkPoetry2Nix {pkgs = pkgs.${system};}) mkPoetryApplication;
|
inherit (poetry2nix.lib.mkPoetry2Nix {pkgs = pkgs.${system};}) mkPoetryApplication;
|
||||||
in {
|
in {
|
||||||
default = mkPoetryApplication {projectDir = self;};
|
default = mkPoetryApplication {
|
||||||
|
projectDir = self;
|
||||||
|
checkGroups = [];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
apps = forAllSystems (system: {
|
||||||
|
default = {
|
||||||
|
type = "app";
|
||||||
|
program = "${self.packages.${system}.default}/bin/nix-background-upgrade";
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
devShells = forAllSystems (system: let
|
devShells = forAllSystems (system: let
|
||||||
|
|
|
@ -9,7 +9,7 @@ repository = "https://git.xenia.me.uk/pixelifytica/nix-background-upgrade"
|
||||||
packages = [{include = "nix_background_upgrade", from = "src"}]
|
packages = [{include = "nix_background_upgrade", from = "src"}]
|
||||||
|
|
||||||
[tool.poetry.scripts]
|
[tool.poetry.scripts]
|
||||||
nbu = 'nix_background_upgrade.main:main'
|
nix-background-upgrade = 'nix_background_upgrade.cli:main'
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.9"
|
python = "^3.9"
|
||||||
|
|
Loading…
Reference in a new issue