apx: migrate to finalAttrs
This commit is contained in:
@@ -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";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user