apx: migrate to finalAttrs

This commit is contained in:
Guy Chronister
2026-02-12 08:28:07 -06:00
parent 075c941eef
commit aa0f706f63
+8 -8
View File
@@ -12,7 +12,7 @@
writeShellScript,
}:
buildGoModule rec {
buildGoModule (finalAttrs: {
pname = "apx";
version = "2.4.5";
versionConfig = "1.0.0";
@@ -20,7 +20,7 @@ buildGoModule rec {
src = fetchFromGitHub {
owner = "Vanilla-OS";
repo = "apx";
tag = "v${version}";
tag = "v${finalAttrs.version}";
hash = "sha256-0Rfj7hrH26R9GHOPPVdCaeb1bfAw9KnPpJYXyiei90U=";
};
@@ -28,7 +28,7 @@ buildGoModule rec {
configsSrc = fetchFromGitHub {
owner = "Vanilla-OS";
repo = "vanilla-apx-configs";
tag = "v${versionConfig}";
tag = "v${finalAttrs.versionConfig}";
hash = "sha256-cCXmHkRjcWcpMtgPVtQF5Q76jr1Qt2RHSLtWLQdq+aE=";
};
@@ -47,7 +47,7 @@ buildGoModule rec {
ldflags = [
"-s"
"-w"
"-X 'main.Version=v${version}'"
"-X 'main.Version=v${finalAttrs.version}'"
];
postPatch = ''
@@ -64,8 +64,8 @@ buildGoModule rec {
# Install official Vanilla configs (same as install script)
install -d $out/share/apx
cp -r ${configsSrc}/stacks $out/share/apx/
cp -r ${configsSrc}/package-managers $out/share/apx/
cp -r ${finalAttrs.configsSrc}/stacks $out/share/apx/
cp -r ${finalAttrs.configsSrc}/package-managers $out/share/apx/
# Man pages, documentation, license
installManPage man/man1/*
@@ -113,7 +113,7 @@ buildGoModule rec {
environment.systemPackages = with pkgs; [ apx ];
'';
homepage = "https://github.com/Vanilla-OS/apx";
changelog = "https://github.com/Vanilla-OS/apx/releases/tag/v${version}";
changelog = "https://github.com/Vanilla-OS/apx/releases/tag/v${finalAttrs.version}";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [
dit7ya
@@ -122,4 +122,4 @@ buildGoModule rec {
];
mainProgram = "apx";
};
}
})