Demonstrate bundling a console application.

pull/10/head
Joshua Potter 2023-11-27 20:49:55 -07:00
parent ffa29d401c
commit 21d7c3a9d6
4 changed files with 11 additions and 6 deletions

View File

@ -0,0 +1,2 @@
def main():
print("hello world")

View File

@ -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

View File

@ -1,2 +0,0 @@
if __name__ == '__main__':
pass

View File

@ -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"