2025-12-05 15:57:45 +01:00
|
|
|
{
|
|
|
|
|
description = "Nix flake for Kevin's package-manager tool";
|
|
|
|
|
|
2025-12-06 17:47:46 +01:00
|
|
|
nixConfig = {
|
2025-12-05 20:20:33 +01:00
|
|
|
extra-experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
|
};
|
|
|
|
|
|
2025-12-05 15:57:45 +01:00
|
|
|
inputs = {
|
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs }:
|
|
|
|
|
let
|
2025-12-05 19:32:42 +01:00
|
|
|
systems = [ "x86_64-linux" "aarch64-linux" ];
|
|
|
|
|
|
|
|
|
|
forAllSystems = f:
|
|
|
|
|
builtins.listToAttrs (map (system: {
|
|
|
|
|
name = system;
|
|
|
|
|
value = f system;
|
|
|
|
|
}) systems);
|
Use pyproject-based Nix flake build and fix install logic for pkgmgr
- Add pyproject.toml to define package-manager as a Python application
- Declare setuptools build backend (setuptools.build_meta) and wheel
- Expose CLI entrypoint via [project.scripts] as `pkgmgr = pkgmgr.cli:main`
- Define PyYAML as a base runtime dependency
- Update flake.nix to build pkgmgr via python311Packages.buildPythonApplication
- Use format = "pyproject" and src = ./. (current git checkout)
- Add setuptools and wheel to nativeBuildInputs for the backend
- Add pyyaml to propagatedBuildInputs to match pyproject dependencies
- Provide a devShell that includes the built pkgmgr, git, and Ansible
- Expose `nix run .#pkgmgr` and `nix run .#default` as flake apps
- Fix Makefile install target for Nix shells
- Treat install as a no-op when IN_NIX_SHELL is set (skip venv / pip)
- In non-Nix environments, create ~/.venvs/pkgmgr, install deps, and
wire automatic activation into shell rc files
- Keep Arch/Manjaro-specific aur_builder/yay setup behind pacman check
- Adjust PKGBUILD prepare() to correctly copy the full project tree
- Stop excluding the top-level src directory from rsync
- Still exclude .git, .github, pkg, and srcpkg
This unifies the installation workflow across Arch, Nix, and local venvs,
and ensures pkgmgr builds cleanly inside the Docker-based Nix devShell tests.
Reference: ChatGPT-assisted refactor & debugging session on 2025-12-07.
https://chatgpt.com/share/6935ee1f-6c0c-800f-bb32-434c4051bd1e
2025-12-07 22:14:29 +01:00
|
|
|
in
|
|
|
|
|
{
|
|
|
|
|
##########################################################################
|
|
|
|
|
# PACKAGES
|
|
|
|
|
##########################################################################
|
|
|
|
|
packages = forAllSystems (system:
|
2025-12-05 19:32:42 +01:00
|
|
|
let
|
2025-12-11 11:04:12 +01:00
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
|
python = pkgs.python311;
|
|
|
|
|
pyPkgs = pkgs.python311Packages;
|
Use pyproject-based Nix flake build and fix install logic for pkgmgr
- Add pyproject.toml to define package-manager as a Python application
- Declare setuptools build backend (setuptools.build_meta) and wheel
- Expose CLI entrypoint via [project.scripts] as `pkgmgr = pkgmgr.cli:main`
- Define PyYAML as a base runtime dependency
- Update flake.nix to build pkgmgr via python311Packages.buildPythonApplication
- Use format = "pyproject" and src = ./. (current git checkout)
- Add setuptools and wheel to nativeBuildInputs for the backend
- Add pyyaml to propagatedBuildInputs to match pyproject dependencies
- Provide a devShell that includes the built pkgmgr, git, and Ansible
- Expose `nix run .#pkgmgr` and `nix run .#default` as flake apps
- Fix Makefile install target for Nix shells
- Treat install as a no-op when IN_NIX_SHELL is set (skip venv / pip)
- In non-Nix environments, create ~/.venvs/pkgmgr, install deps, and
wire automatic activation into shell rc files
- Keep Arch/Manjaro-specific aur_builder/yay setup behind pacman check
- Adjust PKGBUILD prepare() to correctly copy the full project tree
- Stop excluding the top-level src directory from rsync
- Still exclude .git, .github, pkg, and srcpkg
This unifies the installation workflow across Arch, Nix, and local venvs,
and ensures pkgmgr builds cleanly inside the Docker-based Nix devShell tests.
Reference: ChatGPT-assisted refactor & debugging session on 2025-12-07.
https://chatgpt.com/share/6935ee1f-6c0c-800f-bb32-434c4051bd1e
2025-12-07 22:14:29 +01:00
|
|
|
in
|
|
|
|
|
rec {
|
|
|
|
|
pkgmgr = pyPkgs.buildPythonApplication {
|
|
|
|
|
pname = "package-manager";
|
2025-12-14 12:58:35 +01:00
|
|
|
version = "1.6.2";
|
2025-12-06 17:47:46 +01:00
|
|
|
|
Use pyproject-based Nix flake build and fix install logic for pkgmgr
- Add pyproject.toml to define package-manager as a Python application
- Declare setuptools build backend (setuptools.build_meta) and wheel
- Expose CLI entrypoint via [project.scripts] as `pkgmgr = pkgmgr.cli:main`
- Define PyYAML as a base runtime dependency
- Update flake.nix to build pkgmgr via python311Packages.buildPythonApplication
- Use format = "pyproject" and src = ./. (current git checkout)
- Add setuptools and wheel to nativeBuildInputs for the backend
- Add pyyaml to propagatedBuildInputs to match pyproject dependencies
- Provide a devShell that includes the built pkgmgr, git, and Ansible
- Expose `nix run .#pkgmgr` and `nix run .#default` as flake apps
- Fix Makefile install target for Nix shells
- Treat install as a no-op when IN_NIX_SHELL is set (skip venv / pip)
- In non-Nix environments, create ~/.venvs/pkgmgr, install deps, and
wire automatic activation into shell rc files
- Keep Arch/Manjaro-specific aur_builder/yay setup behind pacman check
- Adjust PKGBUILD prepare() to correctly copy the full project tree
- Stop excluding the top-level src directory from rsync
- Still exclude .git, .github, pkg, and srcpkg
This unifies the installation workflow across Arch, Nix, and local venvs,
and ensures pkgmgr builds cleanly inside the Docker-based Nix devShell tests.
Reference: ChatGPT-assisted refactor & debugging session on 2025-12-07.
https://chatgpt.com/share/6935ee1f-6c0c-800f-bb32-434c4051bd1e
2025-12-07 22:14:29 +01:00
|
|
|
# Use the git repo as source
|
|
|
|
|
src = ./.;
|
2025-12-06 17:47:46 +01:00
|
|
|
|
Use pyproject-based Nix flake build and fix install logic for pkgmgr
- Add pyproject.toml to define package-manager as a Python application
- Declare setuptools build backend (setuptools.build_meta) and wheel
- Expose CLI entrypoint via [project.scripts] as `pkgmgr = pkgmgr.cli:main`
- Define PyYAML as a base runtime dependency
- Update flake.nix to build pkgmgr via python311Packages.buildPythonApplication
- Use format = "pyproject" and src = ./. (current git checkout)
- Add setuptools and wheel to nativeBuildInputs for the backend
- Add pyyaml to propagatedBuildInputs to match pyproject dependencies
- Provide a devShell that includes the built pkgmgr, git, and Ansible
- Expose `nix run .#pkgmgr` and `nix run .#default` as flake apps
- Fix Makefile install target for Nix shells
- Treat install as a no-op when IN_NIX_SHELL is set (skip venv / pip)
- In non-Nix environments, create ~/.venvs/pkgmgr, install deps, and
wire automatic activation into shell rc files
- Keep Arch/Manjaro-specific aur_builder/yay setup behind pacman check
- Adjust PKGBUILD prepare() to correctly copy the full project tree
- Stop excluding the top-level src directory from rsync
- Still exclude .git, .github, pkg, and srcpkg
This unifies the installation workflow across Arch, Nix, and local venvs,
and ensures pkgmgr builds cleanly inside the Docker-based Nix devShell tests.
Reference: ChatGPT-assisted refactor & debugging session on 2025-12-07.
https://chatgpt.com/share/6935ee1f-6c0c-800f-bb32-434c4051bd1e
2025-12-07 22:14:29 +01:00
|
|
|
# Build using pyproject.toml
|
|
|
|
|
format = "pyproject";
|
2025-12-05 19:32:42 +01:00
|
|
|
|
Use pyproject-based Nix flake build and fix install logic for pkgmgr
- Add pyproject.toml to define package-manager as a Python application
- Declare setuptools build backend (setuptools.build_meta) and wheel
- Expose CLI entrypoint via [project.scripts] as `pkgmgr = pkgmgr.cli:main`
- Define PyYAML as a base runtime dependency
- Update flake.nix to build pkgmgr via python311Packages.buildPythonApplication
- Use format = "pyproject" and src = ./. (current git checkout)
- Add setuptools and wheel to nativeBuildInputs for the backend
- Add pyyaml to propagatedBuildInputs to match pyproject dependencies
- Provide a devShell that includes the built pkgmgr, git, and Ansible
- Expose `nix run .#pkgmgr` and `nix run .#default` as flake apps
- Fix Makefile install target for Nix shells
- Treat install as a no-op when IN_NIX_SHELL is set (skip venv / pip)
- In non-Nix environments, create ~/.venvs/pkgmgr, install deps, and
wire automatic activation into shell rc files
- Keep Arch/Manjaro-specific aur_builder/yay setup behind pacman check
- Adjust PKGBUILD prepare() to correctly copy the full project tree
- Stop excluding the top-level src directory from rsync
- Still exclude .git, .github, pkg, and srcpkg
This unifies the installation workflow across Arch, Nix, and local venvs,
and ensures pkgmgr builds cleanly inside the Docker-based Nix devShell tests.
Reference: ChatGPT-assisted refactor & debugging session on 2025-12-07.
https://chatgpt.com/share/6935ee1f-6c0c-800f-bb32-434c4051bd1e
2025-12-07 22:14:29 +01:00
|
|
|
# Build backend requirements from [build-system]
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
|
pyPkgs.setuptools
|
|
|
|
|
pyPkgs.wheel
|
2025-12-05 19:32:42 +01:00
|
|
|
];
|
Use pyproject-based Nix flake build and fix install logic for pkgmgr
- Add pyproject.toml to define package-manager as a Python application
- Declare setuptools build backend (setuptools.build_meta) and wheel
- Expose CLI entrypoint via [project.scripts] as `pkgmgr = pkgmgr.cli:main`
- Define PyYAML as a base runtime dependency
- Update flake.nix to build pkgmgr via python311Packages.buildPythonApplication
- Use format = "pyproject" and src = ./. (current git checkout)
- Add setuptools and wheel to nativeBuildInputs for the backend
- Add pyyaml to propagatedBuildInputs to match pyproject dependencies
- Provide a devShell that includes the built pkgmgr, git, and Ansible
- Expose `nix run .#pkgmgr` and `nix run .#default` as flake apps
- Fix Makefile install target for Nix shells
- Treat install as a no-op when IN_NIX_SHELL is set (skip venv / pip)
- In non-Nix environments, create ~/.venvs/pkgmgr, install deps, and
wire automatic activation into shell rc files
- Keep Arch/Manjaro-specific aur_builder/yay setup behind pacman check
- Adjust PKGBUILD prepare() to correctly copy the full project tree
- Stop excluding the top-level src directory from rsync
- Still exclude .git, .github, pkg, and srcpkg
This unifies the installation workflow across Arch, Nix, and local venvs,
and ensures pkgmgr builds cleanly inside the Docker-based Nix devShell tests.
Reference: ChatGPT-assisted refactor & debugging session on 2025-12-07.
https://chatgpt.com/share/6935ee1f-6c0c-800f-bb32-434c4051bd1e
2025-12-07 22:14:29 +01:00
|
|
|
|
2025-12-11 09:33:55 +01:00
|
|
|
# Runtime dependencies (matches [project.dependencies] in pyproject.toml)
|
Use pyproject-based Nix flake build and fix install logic for pkgmgr
- Add pyproject.toml to define package-manager as a Python application
- Declare setuptools build backend (setuptools.build_meta) and wheel
- Expose CLI entrypoint via [project.scripts] as `pkgmgr = pkgmgr.cli:main`
- Define PyYAML as a base runtime dependency
- Update flake.nix to build pkgmgr via python311Packages.buildPythonApplication
- Use format = "pyproject" and src = ./. (current git checkout)
- Add setuptools and wheel to nativeBuildInputs for the backend
- Add pyyaml to propagatedBuildInputs to match pyproject dependencies
- Provide a devShell that includes the built pkgmgr, git, and Ansible
- Expose `nix run .#pkgmgr` and `nix run .#default` as flake apps
- Fix Makefile install target for Nix shells
- Treat install as a no-op when IN_NIX_SHELL is set (skip venv / pip)
- In non-Nix environments, create ~/.venvs/pkgmgr, install deps, and
wire automatic activation into shell rc files
- Keep Arch/Manjaro-specific aur_builder/yay setup behind pacman check
- Adjust PKGBUILD prepare() to correctly copy the full project tree
- Stop excluding the top-level src directory from rsync
- Still exclude .git, .github, pkg, and srcpkg
This unifies the installation workflow across Arch, Nix, and local venvs,
and ensures pkgmgr builds cleanly inside the Docker-based Nix devShell tests.
Reference: ChatGPT-assisted refactor & debugging session on 2025-12-07.
https://chatgpt.com/share/6935ee1f-6c0c-800f-bb32-434c4051bd1e
2025-12-07 22:14:29 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
|
pyPkgs.pyyaml
|
Refine installer layering and Python/Nix integration
- Introduce explicit CLI layer model (os-packages, nix, python, makefile)
and central InstallationPipeline to orchestrate installers.
- Move installer orchestration out of install_repos() into
pkgmgr.actions.repository.install.pipeline, using layer precedence and
capability tracking.
- Add pkgmgr.actions.repository.install.layers to classify commands into
layers and compare priorities.
- Rework PythonInstaller to always use isolated environments:
PKGMGR_PIP override → active venv → per-repo venv under ~/.venvs/<identifier>,
avoiding system Python and PEP 668 conflicts.
- Adjust NixFlakeInstaller to install flake outputs based on repository
identity: pkgmgr/package-manager → pkgmgr (mandatory) + default (optional),
all other repos → default (mandatory).
- Tighten MakefileInstaller behaviour, add global
PKGMGR_DISABLE_MAKEFILE_INSTALLER switch, and simplify install target
detection.
- Rewrite resolve_command_for_repo() with explicit Repository typing,
better Python package detection, Nix/PATH resolution, and a
library-only fallback instead of raising on missing CLI.
- Update flake.nix devShell to provide python3 with pip and add pip as a
propagated build input.
- Remove deprecated/wip repository entries from config defaults and drop
the unused config/wip.yml.
https://chatgpt.com/share/69399157-86d8-800f-9935-1a820893e908
2025-12-10 16:26:23 +01:00
|
|
|
pyPkgs.pip
|
Use pyproject-based Nix flake build and fix install logic for pkgmgr
- Add pyproject.toml to define package-manager as a Python application
- Declare setuptools build backend (setuptools.build_meta) and wheel
- Expose CLI entrypoint via [project.scripts] as `pkgmgr = pkgmgr.cli:main`
- Define PyYAML as a base runtime dependency
- Update flake.nix to build pkgmgr via python311Packages.buildPythonApplication
- Use format = "pyproject" and src = ./. (current git checkout)
- Add setuptools and wheel to nativeBuildInputs for the backend
- Add pyyaml to propagatedBuildInputs to match pyproject dependencies
- Provide a devShell that includes the built pkgmgr, git, and Ansible
- Expose `nix run .#pkgmgr` and `nix run .#default` as flake apps
- Fix Makefile install target for Nix shells
- Treat install as a no-op when IN_NIX_SHELL is set (skip venv / pip)
- In non-Nix environments, create ~/.venvs/pkgmgr, install deps, and
wire automatic activation into shell rc files
- Keep Arch/Manjaro-specific aur_builder/yay setup behind pacman check
- Adjust PKGBUILD prepare() to correctly copy the full project tree
- Stop excluding the top-level src directory from rsync
- Still exclude .git, .github, pkg, and srcpkg
This unifies the installation workflow across Arch, Nix, and local venvs,
and ensures pkgmgr builds cleanly inside the Docker-based Nix devShell tests.
Reference: ChatGPT-assisted refactor & debugging session on 2025-12-07.
https://chatgpt.com/share/6935ee1f-6c0c-800f-bb32-434c4051bd1e
2025-12-07 22:14:29 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "pkgmgr" ];
|
2025-12-05 19:32:42 +01:00
|
|
|
};
|
2025-12-11 09:33:55 +01:00
|
|
|
|
Use pyproject-based Nix flake build and fix install logic for pkgmgr
- Add pyproject.toml to define package-manager as a Python application
- Declare setuptools build backend (setuptools.build_meta) and wheel
- Expose CLI entrypoint via [project.scripts] as `pkgmgr = pkgmgr.cli:main`
- Define PyYAML as a base runtime dependency
- Update flake.nix to build pkgmgr via python311Packages.buildPythonApplication
- Use format = "pyproject" and src = ./. (current git checkout)
- Add setuptools and wheel to nativeBuildInputs for the backend
- Add pyyaml to propagatedBuildInputs to match pyproject dependencies
- Provide a devShell that includes the built pkgmgr, git, and Ansible
- Expose `nix run .#pkgmgr` and `nix run .#default` as flake apps
- Fix Makefile install target for Nix shells
- Treat install as a no-op when IN_NIX_SHELL is set (skip venv / pip)
- In non-Nix environments, create ~/.venvs/pkgmgr, install deps, and
wire automatic activation into shell rc files
- Keep Arch/Manjaro-specific aur_builder/yay setup behind pacman check
- Adjust PKGBUILD prepare() to correctly copy the full project tree
- Stop excluding the top-level src directory from rsync
- Still exclude .git, .github, pkg, and srcpkg
This unifies the installation workflow across Arch, Nix, and local venvs,
and ensures pkgmgr builds cleanly inside the Docker-based Nix devShell tests.
Reference: ChatGPT-assisted refactor & debugging session on 2025-12-07.
https://chatgpt.com/share/6935ee1f-6c0c-800f-bb32-434c4051bd1e
2025-12-07 22:14:29 +01:00
|
|
|
default = pkgmgr;
|
2025-12-05 19:32:42 +01:00
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
|
Use pyproject-based Nix flake build and fix install logic for pkgmgr
- Add pyproject.toml to define package-manager as a Python application
- Declare setuptools build backend (setuptools.build_meta) and wheel
- Expose CLI entrypoint via [project.scripts] as `pkgmgr = pkgmgr.cli:main`
- Define PyYAML as a base runtime dependency
- Update flake.nix to build pkgmgr via python311Packages.buildPythonApplication
- Use format = "pyproject" and src = ./. (current git checkout)
- Add setuptools and wheel to nativeBuildInputs for the backend
- Add pyyaml to propagatedBuildInputs to match pyproject dependencies
- Provide a devShell that includes the built pkgmgr, git, and Ansible
- Expose `nix run .#pkgmgr` and `nix run .#default` as flake apps
- Fix Makefile install target for Nix shells
- Treat install as a no-op when IN_NIX_SHELL is set (skip venv / pip)
- In non-Nix environments, create ~/.venvs/pkgmgr, install deps, and
wire automatic activation into shell rc files
- Keep Arch/Manjaro-specific aur_builder/yay setup behind pacman check
- Adjust PKGBUILD prepare() to correctly copy the full project tree
- Stop excluding the top-level src directory from rsync
- Still exclude .git, .github, pkg, and srcpkg
This unifies the installation workflow across Arch, Nix, and local venvs,
and ensures pkgmgr builds cleanly inside the Docker-based Nix devShell tests.
Reference: ChatGPT-assisted refactor & debugging session on 2025-12-07.
https://chatgpt.com/share/6935ee1f-6c0c-800f-bb32-434c4051bd1e
2025-12-07 22:14:29 +01:00
|
|
|
##########################################################################
|
|
|
|
|
# DEVELOPMENT SHELL
|
|
|
|
|
##########################################################################
|
|
|
|
|
devShells = forAllSystems (system:
|
2025-12-06 17:47:46 +01:00
|
|
|
let
|
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
2025-12-05 19:32:42 +01:00
|
|
|
|
2025-12-06 17:47:46 +01:00
|
|
|
ansiblePkg =
|
|
|
|
|
if pkgs ? ansible-core then pkgs.ansible-core
|
|
|
|
|
else pkgs.ansible;
|
Refine installer layering and Python/Nix integration
- Introduce explicit CLI layer model (os-packages, nix, python, makefile)
and central InstallationPipeline to orchestrate installers.
- Move installer orchestration out of install_repos() into
pkgmgr.actions.repository.install.pipeline, using layer precedence and
capability tracking.
- Add pkgmgr.actions.repository.install.layers to classify commands into
layers and compare priorities.
- Rework PythonInstaller to always use isolated environments:
PKGMGR_PIP override → active venv → per-repo venv under ~/.venvs/<identifier>,
avoiding system Python and PEP 668 conflicts.
- Adjust NixFlakeInstaller to install flake outputs based on repository
identity: pkgmgr/package-manager → pkgmgr (mandatory) + default (optional),
all other repos → default (mandatory).
- Tighten MakefileInstaller behaviour, add global
PKGMGR_DISABLE_MAKEFILE_INSTALLER switch, and simplify install target
detection.
- Rewrite resolve_command_for_repo() with explicit Repository typing,
better Python package detection, Nix/PATH resolution, and a
library-only fallback instead of raising on missing CLI.
- Update flake.nix devShell to provide python3 with pip and add pip as a
propagated build input.
- Remove deprecated/wip repository entries from config defaults and drop
the unused config/wip.yml.
https://chatgpt.com/share/69399157-86d8-800f-9935-1a820893e908
2025-12-10 16:26:23 +01:00
|
|
|
|
2025-12-11 11:04:12 +01:00
|
|
|
# Use the same Python version as the package (3.11)
|
|
|
|
|
python = pkgs.python311;
|
2025-12-11 10:30:19 +01:00
|
|
|
|
|
|
|
|
pythonWithDeps = python.withPackages (ps: [
|
Refine installer layering and Python/Nix integration
- Introduce explicit CLI layer model (os-packages, nix, python, makefile)
and central InstallationPipeline to orchestrate installers.
- Move installer orchestration out of install_repos() into
pkgmgr.actions.repository.install.pipeline, using layer precedence and
capability tracking.
- Add pkgmgr.actions.repository.install.layers to classify commands into
layers and compare priorities.
- Rework PythonInstaller to always use isolated environments:
PKGMGR_PIP override → active venv → per-repo venv under ~/.venvs/<identifier>,
avoiding system Python and PEP 668 conflicts.
- Adjust NixFlakeInstaller to install flake outputs based on repository
identity: pkgmgr/package-manager → pkgmgr (mandatory) + default (optional),
all other repos → default (mandatory).
- Tighten MakefileInstaller behaviour, add global
PKGMGR_DISABLE_MAKEFILE_INSTALLER switch, and simplify install target
detection.
- Rewrite resolve_command_for_repo() with explicit Repository typing,
better Python package detection, Nix/PATH resolution, and a
library-only fallback instead of raising on missing CLI.
- Update flake.nix devShell to provide python3 with pip and add pip as a
propagated build input.
- Remove deprecated/wip repository entries from config defaults and drop
the unused config/wip.yml.
https://chatgpt.com/share/69399157-86d8-800f-9935-1a820893e908
2025-12-10 16:26:23 +01:00
|
|
|
ps.pip
|
2025-12-11 09:33:55 +01:00
|
|
|
ps.pyyaml
|
Refine installer layering and Python/Nix integration
- Introduce explicit CLI layer model (os-packages, nix, python, makefile)
and central InstallationPipeline to orchestrate installers.
- Move installer orchestration out of install_repos() into
pkgmgr.actions.repository.install.pipeline, using layer precedence and
capability tracking.
- Add pkgmgr.actions.repository.install.layers to classify commands into
layers and compare priorities.
- Rework PythonInstaller to always use isolated environments:
PKGMGR_PIP override → active venv → per-repo venv under ~/.venvs/<identifier>,
avoiding system Python and PEP 668 conflicts.
- Adjust NixFlakeInstaller to install flake outputs based on repository
identity: pkgmgr/package-manager → pkgmgr (mandatory) + default (optional),
all other repos → default (mandatory).
- Tighten MakefileInstaller behaviour, add global
PKGMGR_DISABLE_MAKEFILE_INSTALLER switch, and simplify install target
detection.
- Rewrite resolve_command_for_repo() with explicit Repository typing,
better Python package detection, Nix/PATH resolution, and a
library-only fallback instead of raising on missing CLI.
- Update flake.nix devShell to provide python3 with pip and add pip as a
propagated build input.
- Remove deprecated/wip repository entries from config defaults and drop
the unused config/wip.yml.
https://chatgpt.com/share/69399157-86d8-800f-9935-1a820893e908
2025-12-10 16:26:23 +01:00
|
|
|
]);
|
2025-12-06 17:47:46 +01:00
|
|
|
in
|
Use pyproject-based Nix flake build and fix install logic for pkgmgr
- Add pyproject.toml to define package-manager as a Python application
- Declare setuptools build backend (setuptools.build_meta) and wheel
- Expose CLI entrypoint via [project.scripts] as `pkgmgr = pkgmgr.cli:main`
- Define PyYAML as a base runtime dependency
- Update flake.nix to build pkgmgr via python311Packages.buildPythonApplication
- Use format = "pyproject" and src = ./. (current git checkout)
- Add setuptools and wheel to nativeBuildInputs for the backend
- Add pyyaml to propagatedBuildInputs to match pyproject dependencies
- Provide a devShell that includes the built pkgmgr, git, and Ansible
- Expose `nix run .#pkgmgr` and `nix run .#default` as flake apps
- Fix Makefile install target for Nix shells
- Treat install as a no-op when IN_NIX_SHELL is set (skip venv / pip)
- In non-Nix environments, create ~/.venvs/pkgmgr, install deps, and
wire automatic activation into shell rc files
- Keep Arch/Manjaro-specific aur_builder/yay setup behind pacman check
- Adjust PKGBUILD prepare() to correctly copy the full project tree
- Stop excluding the top-level src directory from rsync
- Still exclude .git, .github, pkg, and srcpkg
This unifies the installation workflow across Arch, Nix, and local venvs,
and ensures pkgmgr builds cleanly inside the Docker-based Nix devShell tests.
Reference: ChatGPT-assisted refactor & debugging session on 2025-12-07.
https://chatgpt.com/share/6935ee1f-6c0c-800f-bb32-434c4051bd1e
2025-12-07 22:14:29 +01:00
|
|
|
{
|
|
|
|
|
default = pkgs.mkShell {
|
2025-12-06 17:47:46 +01:00
|
|
|
buildInputs = [
|
2025-12-11 09:33:55 +01:00
|
|
|
pythonWithDeps
|
Use pyproject-based Nix flake build and fix install logic for pkgmgr
- Add pyproject.toml to define package-manager as a Python application
- Declare setuptools build backend (setuptools.build_meta) and wheel
- Expose CLI entrypoint via [project.scripts] as `pkgmgr = pkgmgr.cli:main`
- Define PyYAML as a base runtime dependency
- Update flake.nix to build pkgmgr via python311Packages.buildPythonApplication
- Use format = "pyproject" and src = ./. (current git checkout)
- Add setuptools and wheel to nativeBuildInputs for the backend
- Add pyyaml to propagatedBuildInputs to match pyproject dependencies
- Provide a devShell that includes the built pkgmgr, git, and Ansible
- Expose `nix run .#pkgmgr` and `nix run .#default` as flake apps
- Fix Makefile install target for Nix shells
- Treat install as a no-op when IN_NIX_SHELL is set (skip venv / pip)
- In non-Nix environments, create ~/.venvs/pkgmgr, install deps, and
wire automatic activation into shell rc files
- Keep Arch/Manjaro-specific aur_builder/yay setup behind pacman check
- Adjust PKGBUILD prepare() to correctly copy the full project tree
- Stop excluding the top-level src directory from rsync
- Still exclude .git, .github, pkg, and srcpkg
This unifies the installation workflow across Arch, Nix, and local venvs,
and ensures pkgmgr builds cleanly inside the Docker-based Nix devShell tests.
Reference: ChatGPT-assisted refactor & debugging session on 2025-12-07.
https://chatgpt.com/share/6935ee1f-6c0c-800f-bb32-434c4051bd1e
2025-12-07 22:14:29 +01:00
|
|
|
pkgs.git
|
2025-12-06 17:47:46 +01:00
|
|
|
ansiblePkg
|
|
|
|
|
];
|
|
|
|
|
|
Use pyproject-based Nix flake build and fix install logic for pkgmgr
- Add pyproject.toml to define package-manager as a Python application
- Declare setuptools build backend (setuptools.build_meta) and wheel
- Expose CLI entrypoint via [project.scripts] as `pkgmgr = pkgmgr.cli:main`
- Define PyYAML as a base runtime dependency
- Update flake.nix to build pkgmgr via python311Packages.buildPythonApplication
- Use format = "pyproject" and src = ./. (current git checkout)
- Add setuptools and wheel to nativeBuildInputs for the backend
- Add pyyaml to propagatedBuildInputs to match pyproject dependencies
- Provide a devShell that includes the built pkgmgr, git, and Ansible
- Expose `nix run .#pkgmgr` and `nix run .#default` as flake apps
- Fix Makefile install target for Nix shells
- Treat install as a no-op when IN_NIX_SHELL is set (skip venv / pip)
- In non-Nix environments, create ~/.venvs/pkgmgr, install deps, and
wire automatic activation into shell rc files
- Keep Arch/Manjaro-specific aur_builder/yay setup behind pacman check
- Adjust PKGBUILD prepare() to correctly copy the full project tree
- Stop excluding the top-level src directory from rsync
- Still exclude .git, .github, pkg, and srcpkg
This unifies the installation workflow across Arch, Nix, and local venvs,
and ensures pkgmgr builds cleanly inside the Docker-based Nix devShell tests.
Reference: ChatGPT-assisted refactor & debugging session on 2025-12-07.
https://chatgpt.com/share/6935ee1f-6c0c-800f-bb32-434c4051bd1e
2025-12-07 22:14:29 +01:00
|
|
|
shellHook = ''
|
2025-12-11 11:04:12 +01:00
|
|
|
# Ensure our Python with dependencies is preferred on PATH
|
|
|
|
|
export PATH=${pythonWithDeps}/bin:$PATH
|
|
|
|
|
|
2025-12-11 09:33:55 +01:00
|
|
|
# Ensure src/ layout is importable:
|
|
|
|
|
# pkgmgr lives in ./src/pkgmgr
|
|
|
|
|
export PYTHONPATH="$PWD/src:${PYTHONPATH:-}"
|
|
|
|
|
# Also add repo root in case tools/tests rely on it
|
|
|
|
|
export PYTHONPATH="$PWD:$PYTHONPATH"
|
|
|
|
|
|
Use pyproject-based Nix flake build and fix install logic for pkgmgr
- Add pyproject.toml to define package-manager as a Python application
- Declare setuptools build backend (setuptools.build_meta) and wheel
- Expose CLI entrypoint via [project.scripts] as `pkgmgr = pkgmgr.cli:main`
- Define PyYAML as a base runtime dependency
- Update flake.nix to build pkgmgr via python311Packages.buildPythonApplication
- Use format = "pyproject" and src = ./. (current git checkout)
- Add setuptools and wheel to nativeBuildInputs for the backend
- Add pyyaml to propagatedBuildInputs to match pyproject dependencies
- Provide a devShell that includes the built pkgmgr, git, and Ansible
- Expose `nix run .#pkgmgr` and `nix run .#default` as flake apps
- Fix Makefile install target for Nix shells
- Treat install as a no-op when IN_NIX_SHELL is set (skip venv / pip)
- In non-Nix environments, create ~/.venvs/pkgmgr, install deps, and
wire automatic activation into shell rc files
- Keep Arch/Manjaro-specific aur_builder/yay setup behind pacman check
- Adjust PKGBUILD prepare() to correctly copy the full project tree
- Stop excluding the top-level src directory from rsync
- Still exclude .git, .github, pkg, and srcpkg
This unifies the installation workflow across Arch, Nix, and local venvs,
and ensures pkgmgr builds cleanly inside the Docker-based Nix devShell tests.
Reference: ChatGPT-assisted refactor & debugging session on 2025-12-07.
https://chatgpt.com/share/6935ee1f-6c0c-800f-bb32-434c4051bd1e
2025-12-07 22:14:29 +01:00
|
|
|
echo "Entered pkgmgr development shell for ${system}"
|
2025-12-11 10:30:19 +01:00
|
|
|
echo "Python used in this shell:"
|
|
|
|
|
python --version
|
2025-12-11 09:33:55 +01:00
|
|
|
echo "pkgmgr CLI (from source) is available via:"
|
|
|
|
|
echo " python -m pkgmgr.cli --help"
|
2025-12-06 17:47:46 +01:00
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
);
|
2025-12-05 15:57:45 +01:00
|
|
|
|
Use pyproject-based Nix flake build and fix install logic for pkgmgr
- Add pyproject.toml to define package-manager as a Python application
- Declare setuptools build backend (setuptools.build_meta) and wheel
- Expose CLI entrypoint via [project.scripts] as `pkgmgr = pkgmgr.cli:main`
- Define PyYAML as a base runtime dependency
- Update flake.nix to build pkgmgr via python311Packages.buildPythonApplication
- Use format = "pyproject" and src = ./. (current git checkout)
- Add setuptools and wheel to nativeBuildInputs for the backend
- Add pyyaml to propagatedBuildInputs to match pyproject dependencies
- Provide a devShell that includes the built pkgmgr, git, and Ansible
- Expose `nix run .#pkgmgr` and `nix run .#default` as flake apps
- Fix Makefile install target for Nix shells
- Treat install as a no-op when IN_NIX_SHELL is set (skip venv / pip)
- In non-Nix environments, create ~/.venvs/pkgmgr, install deps, and
wire automatic activation into shell rc files
- Keep Arch/Manjaro-specific aur_builder/yay setup behind pacman check
- Adjust PKGBUILD prepare() to correctly copy the full project tree
- Stop excluding the top-level src directory from rsync
- Still exclude .git, .github, pkg, and srcpkg
This unifies the installation workflow across Arch, Nix, and local venvs,
and ensures pkgmgr builds cleanly inside the Docker-based Nix devShell tests.
Reference: ChatGPT-assisted refactor & debugging session on 2025-12-07.
https://chatgpt.com/share/6935ee1f-6c0c-800f-bb32-434c4051bd1e
2025-12-07 22:14:29 +01:00
|
|
|
##########################################################################
|
|
|
|
|
# nix run .#pkgmgr
|
|
|
|
|
##########################################################################
|
2025-12-05 19:32:42 +01:00
|
|
|
apps = forAllSystems (system:
|
|
|
|
|
let
|
|
|
|
|
pkgmgrPkg = self.packages.${system}.pkgmgr;
|
Use pyproject-based Nix flake build and fix install logic for pkgmgr
- Add pyproject.toml to define package-manager as a Python application
- Declare setuptools build backend (setuptools.build_meta) and wheel
- Expose CLI entrypoint via [project.scripts] as `pkgmgr = pkgmgr.cli:main`
- Define PyYAML as a base runtime dependency
- Update flake.nix to build pkgmgr via python311Packages.buildPythonApplication
- Use format = "pyproject" and src = ./. (current git checkout)
- Add setuptools and wheel to nativeBuildInputs for the backend
- Add pyyaml to propagatedBuildInputs to match pyproject dependencies
- Provide a devShell that includes the built pkgmgr, git, and Ansible
- Expose `nix run .#pkgmgr` and `nix run .#default` as flake apps
- Fix Makefile install target for Nix shells
- Treat install as a no-op when IN_NIX_SHELL is set (skip venv / pip)
- In non-Nix environments, create ~/.venvs/pkgmgr, install deps, and
wire automatic activation into shell rc files
- Keep Arch/Manjaro-specific aur_builder/yay setup behind pacman check
- Adjust PKGBUILD prepare() to correctly copy the full project tree
- Stop excluding the top-level src directory from rsync
- Still exclude .git, .github, pkg, and srcpkg
This unifies the installation workflow across Arch, Nix, and local venvs,
and ensures pkgmgr builds cleanly inside the Docker-based Nix devShell tests.
Reference: ChatGPT-assisted refactor & debugging session on 2025-12-07.
https://chatgpt.com/share/6935ee1f-6c0c-800f-bb32-434c4051bd1e
2025-12-07 22:14:29 +01:00
|
|
|
in
|
|
|
|
|
{
|
2025-12-05 19:32:42 +01:00
|
|
|
pkgmgr = {
|
|
|
|
|
type = "app";
|
|
|
|
|
program = "${pkgmgrPkg}/bin/pkgmgr";
|
|
|
|
|
};
|
Use pyproject-based Nix flake build and fix install logic for pkgmgr
- Add pyproject.toml to define package-manager as a Python application
- Declare setuptools build backend (setuptools.build_meta) and wheel
- Expose CLI entrypoint via [project.scripts] as `pkgmgr = pkgmgr.cli:main`
- Define PyYAML as a base runtime dependency
- Update flake.nix to build pkgmgr via python311Packages.buildPythonApplication
- Use format = "pyproject" and src = ./. (current git checkout)
- Add setuptools and wheel to nativeBuildInputs for the backend
- Add pyyaml to propagatedBuildInputs to match pyproject dependencies
- Provide a devShell that includes the built pkgmgr, git, and Ansible
- Expose `nix run .#pkgmgr` and `nix run .#default` as flake apps
- Fix Makefile install target for Nix shells
- Treat install as a no-op when IN_NIX_SHELL is set (skip venv / pip)
- In non-Nix environments, create ~/.venvs/pkgmgr, install deps, and
wire automatic activation into shell rc files
- Keep Arch/Manjaro-specific aur_builder/yay setup behind pacman check
- Adjust PKGBUILD prepare() to correctly copy the full project tree
- Stop excluding the top-level src directory from rsync
- Still exclude .git, .github, pkg, and srcpkg
This unifies the installation workflow across Arch, Nix, and local venvs,
and ensures pkgmgr builds cleanly inside the Docker-based Nix devShell tests.
Reference: ChatGPT-assisted refactor & debugging session on 2025-12-07.
https://chatgpt.com/share/6935ee1f-6c0c-800f-bb32-434c4051bd1e
2025-12-07 22:14:29 +01:00
|
|
|
|
2025-12-05 19:32:42 +01:00
|
|
|
default = self.apps.${system}.pkgmgr;
|
|
|
|
|
}
|
|
|
|
|
);
|
2025-12-05 15:57:45 +01:00
|
|
|
};
|
|
|
|
|
}
|