Demonstrate bundling a console application.
parent
ffa29d401c
commit
21d7c3a9d6
|
@ -0,0 +1,2 @@
|
||||||
|
def main():
|
||||||
|
print("hello world")
|
|
@ -64,21 +64,23 @@
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages = {
|
packages = {
|
||||||
tmpl-app = mkPoetryApplication {
|
app = mkPoetryApplication {
|
||||||
projectDir = ./.;
|
projectDir = ./.;
|
||||||
overrides = poetry2nix-overrides;
|
overrides = poetry2nix-overrides;
|
||||||
};
|
};
|
||||||
default = self.packages.${system}.tmpl-app;
|
|
||||||
|
default = self.packages.${system}.app;
|
||||||
};
|
};
|
||||||
|
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
inputsFrom = [ self.packages.${system}.tmpl-app ];
|
inputsFrom = [ self.packages.${system}.app ];
|
||||||
packages = [
|
packages = [
|
||||||
pkgs.poetry
|
pkgs.poetry
|
||||||
] ++ (with pkgs.python311Packages; [
|
] ++ (with pkgs.python311Packages; [
|
||||||
black
|
black
|
||||||
debugpy
|
debugpy
|
||||||
mccabe
|
mccabe
|
||||||
|
mypy
|
||||||
pycodestyle
|
pycodestyle
|
||||||
pyflakes
|
pyflakes
|
||||||
python-lsp-black
|
python-lsp-black
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
if __name__ == '__main__':
|
|
||||||
pass
|
|
|
@ -1,5 +1,5 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "tmpl"
|
name = "app"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = ""
|
description = ""
|
||||||
authors = ["Your Name <you@example.com>"]
|
authors = ["Your Name <you@example.com>"]
|
||||||
|
@ -12,3 +12,6 @@ python = "^3.11"
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry-core"]
|
requires = ["poetry-core"]
|
||||||
build-backend = "poetry.core.masonry.api"
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
|
||||||
|
[tool.poetry.scripts]
|
||||||
|
app = "app:main"
|
||||||
|
|
Loading…
Reference in New Issue