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