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-06 17:47:46 +01:00
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
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
|
|
|
pyPkgs = pkgs.python311Packages;
|
|
|
|
|
in
|
|
|
|
|
rec {
|
|
|
|
|
pkgmgr = pyPkgs.buildPythonApplication {
|
|
|
|
|
pname = "package-manager";
|
2025-12-10 10:38:36 +01:00
|
|
|
version = "0.7.14";
|
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
|
|
|
|
|
|
|
|
# Runtime dependencies (matches [project.dependencies])
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
|
pyPkgs.pyyaml
|
|
|
|
|
# Add more here if needed, e.g.:
|
|
|
|
|
# pyPkgs.click
|
|
|
|
|
# pyPkgs.rich
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "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
|
|
|
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};
|
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
|
|
|
pkgmgrPkg = self.packages.${system}.pkgmgr;
|
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;
|
|
|
|
|
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 = [
|
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
|
|
|
pkgmgrPkg
|
|
|
|
|
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 = ''
|
|
|
|
|
echo "Entered pkgmgr development shell for ${system}"
|
|
|
|
|
echo "pkgmgr CLI is available via the flake build"
|
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
|
|
|
};
|
|
|
|
|
}
|