Package managers¶
APT/DEB (Debian/Ubuntu)¶
- Generates:
debian/control,debian/changelog,debian/rules - Builds:
.debpackages usingdpkg-buildpackage - Publishes: Launchpad PPA using
dput
APK (Alpine Linux)¶
- Generates:
APKBUILD - Builds:
.apkpackages usingabuild - Publishes: Alpine repository (manual upload required)
AUR (Arch User Repository)¶
- Generates:
PKGBUILD - Builds:
.pkg.tar.xzpackages usingmakepkg - Publishes: AUR via SSH using git
Nix¶
- Generates:
default.nixderivation; withnix.flake: true, alsoflake.nixandnix/overlay.nix - Builds:
nix-build default.nixby default, ornix buildwhen flakes are enabled - Publishes: Cachix or Nixpkgs (manual PR)
Flakes¶
With flake: true, run nix flake lock once in your repo so flake.lock pins nixpkgs. End users can add your overlay and install the package, for example:
{ pkgs, ... }: let
version = "1.0.0";
mySrc = pkgs.fetchFromGitHub {
owner = "you";
repo = "yourrepo";
rev = "v${version}";
sha256 = "<hash from nix-prefetch-github or similar>";
};
in {
nixpkgs.overlays = [
(import "${mySrc}/nix/overlay.nix")
];
environment.systemPackages = [ pkgs."your-flake-package" ];
}
Use the same string for pkgs."..." as flake_package in pmsm.yaml (defaults to package.name). Hyphenated names must be quoted as shown.