2023-02-02 18:25:31 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
|
|
|
, installShellFiles
|
|
|
|
, docker
|
|
|
|
, distrobox
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "apx";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "1.8.2";
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Vanilla-OS";
|
|
|
|
repo = pname;
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-nBhSl4r7LlgCA5/HCLpOleihE5n/JCJgf43KdCklQbg=";
|
2023-02-02 18:25:31 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
vendorHash = null;
|
2023-02-02 18:25:31 +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-07-15 17:15:38 +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-02-02 18:25:31 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "The Vanilla OS package manager";
|
|
|
|
homepage = "https://github.com/Vanilla-OS/apx";
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://github.com/Vanilla-OS/apx/releases/tag/${version}";
|
|
|
|
license = licenses.gpl3Only;
|
2023-02-02 18:25:31 +00:00
|
|
|
maintainers = with maintainers; [ dit7ya ];
|
|
|
|
};
|
|
|
|
}
|