poetry init

This commit is contained in:
Gregor Kleen 2023-05-07 12:19:29 +02:00
parent cc710b3859
commit e7da4d4b51
7 changed files with 68 additions and 0 deletions

2
.gitignore vendored
View File

@ -10,3 +10,5 @@
**/.#*
.pre-commit-config.yaml
*.AppImage

View File

@ -67,9 +67,30 @@
};
packages = {
default = config.packages.k8s-gitlab-borg;
k8s-gitlab-borg = with pkgs.poetry2nix;
mkPoetryApplication {
projectDir = cleanPythonSources {src = ./.;};
nativeBuildInputs = with pkgs; [makeWrapper];
postInstall = ''
wrapProgram $out/bin/k8s-gitlab-borg \
${pkgs.lib.escapeShellArgs [
"--prefix"
"PATH"
":"
(pkgs.lib.makeBinPath (with pkgs; [borgbackup]))
]}
'';
meta.mainProgram = "k8s-gitlab-borg";
};
};
overlayAttrs = {
inherit (config.packages) k8s-gitlab-borg;
};
};

View File

View File

@ -0,0 +1,13 @@
# SPDX-FileCopyrightText: 2023 Gregor Kleen
#
# SPDX-License-Identifier: GPL-3.0-or-later
import os, sys
def main():
pass
if __name__ == "__main__":
sys.exit(main())

8
poetry.lock generated Normal file
View File

@ -0,0 +1,8 @@
package = []
[metadata]
lock-version = "1.1"
python-versions = "^3.10"
content-hash = "53f2eabc9c26446fbcc00d348c47878e118afc2054778c3c803a0a8028af27d9"
[metadata.files]

3
poetry.lock.license Normal file
View File

@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2023 Gregor Kleen
SPDX-License-Identifier: CC0-1.0

21
pyproject.toml Normal file
View File

@ -0,0 +1,21 @@
# SPDX-FileCopyrightText: 2023 Gregor Kleen
#
# SPDX-License-Identifier: GPL-3.0-or-later
[tool.poetry]
name = "k8s-gitlab-borg"
version = "0.0.0"
description = ""
authors = ["Gregor Kleen <gregor@kleen.consulting>"]
[tool.poetry.dependencies]
python = "^3.10"
[tool.poetry.scripts]
k8s-gitlab-borg = "k8s_gitlab_borg.__main__:main"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"