Make pkgmgr installers fail hard and integrate Nix-based test pipeline (see https://chatgpt.com/share/69332bc4-a128-800f-a69c-fdc24c4cc7fe)

This commit is contained in:
Kevin Veen-Birkenbach
2025-12-05 22:33:49 +01:00
parent 005f828877
commit 218c6a4a82
13 changed files with 187 additions and 121 deletions

View File

@@ -47,33 +47,37 @@
);
# Packages: nix build .#pkgmgr / .#default
packages = forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
python = pkgs.python311;
pypkgs = pkgs.python311Packages;
packages = forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
python = pkgs.python311;
pypkgs = pkgs.python311Packages;
# Be robust: ansible-core if available, otherwise ansible.
ansiblePkg =
if pkgs ? ansible-core then pkgs.ansible-core
else pkgs.ansible;
in
rec {
pkgmgr = pypkgs.buildPythonApplication {
pname = "package-manager";
version = "0.1.0";
src = ./.;
# Be robust: ansible-core if available, otherwise ansible.
ansiblePkg =
if pkgs ? ansible-core then pkgs.ansible-core
else pkgs.ansible;
in
rec {
pkgmgr = pypkgs.buildPythonApplication {
pname = "package-manager";
version = "0.1.0";
src = ./.;
propagatedBuildInputs = [
pypkgs.pyyaml
ansiblePkg
];
};
pyproject = true;
build-system = [ pypkgs.setuptools ];
propagatedBuildInputs = [
pypkgs.pyyaml
ansiblePkg
];
};
# default package just points to pkgmgr
default = pkgmgr;
}
);
# default package just points to pkgmgr
default = pkgmgr;
}
);
# Apps: nix run .#pkgmgr / .#default
apps = forAllSystems (system: