nixpkgs/pkgs/tools/package-management/apx/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

55 lines
1.3 KiB
Nix
Raw Normal View History

2023-01-22 17:34:06 +00:00
{ lib
, buildGoModule
, fetchFromGitHub
, makeWrapper
, installShellFiles
, docker
, distrobox
}:
buildGoModule rec {
pname = "apx";
2023-05-31 04:33:56 +00:00
version = "1.8.2";
2023-01-22 17:34:06 +00:00
src = fetchFromGitHub {
owner = "Vanilla-OS";
repo = pname;
2023-05-31 07:05:35 +00:00
rev = "refs/tags/${version}";
2023-05-31 04:33:56 +00:00
hash = "sha256-nBhSl4r7LlgCA5/HCLpOleihE5n/JCJgf43KdCklQbg=";
2023-01-22 17:34:06 +00:00
};
vendorHash = null;
2023-01-22 17:34:06 +00:00
ldflags = [ "-s" "-w" ];
nativeBuildInputs = [
makeWrapper
installShellFiles
];
postInstall = ''
mkdir -p $out/etc/apx
cat > "$out/etc/apx/config.json" <<EOF
{
"containername": "apx_managed",
"image": "docker.io/library/ubuntu",
"pkgmanager": "apt",
"distroboxpath": "${distrobox}/bin/distrobox"
}
EOF
wrapProgram $out/bin/apx --prefix PATH : ${lib.makeBinPath [ docker distrobox ]}
2023-05-31 04:33:56 +00:00
installManPage man/de/man1/apx.1 man/es/man1/apx.1 man/fr/man1/apx.1 man/it/man1/apx.1 man/man1/apx.1 man/nl/man1/apx.1 man/pl/man1/apx.1 man/pt/man1/apx.1 man/pt_BR/man1/apx.1 man/ro/man1/apx.1 man/ru/man1/apx.1 man/sv/man1/apx.1 man/tr/man1/apx.1
2023-01-22 17:34:06 +00:00
'';
meta = with lib; {
description = "The Vanilla OS package manager";
homepage = "https://github.com/Vanilla-OS/apx";
2023-05-31 07:05:35 +00:00
changelog = "https://github.com/Vanilla-OS/apx/releases/tag/${version}";
2023-05-31 07:06:17 +00:00
license = licenses.gpl3Only;
2023-01-22 17:34:06 +00:00
maintainers = with maintainers; [ dit7ya ];
};
}