apx: use writableTmpDirAsHomeHook
This commit is contained in:
parent
9322094a23
commit
6f6f5736b3
@ -5,6 +5,7 @@
|
||||
installShellFiles,
|
||||
distrobox,
|
||||
podman,
|
||||
writableTmpDirAsHomeHook,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
@ -14,7 +15,7 @@ buildGoModule rec {
|
||||
src = fetchFromGitHub {
|
||||
owner = "Vanilla-OS";
|
||||
repo = "apx";
|
||||
rev = "v${version}";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-60z6wbbXQp7MA5l7LP/mToZftX+nbcs2Mewg5jCFwFk=";
|
||||
};
|
||||
|
||||
@ -26,6 +27,10 @@ buildGoModule rec {
|
||||
podman
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
writableTmpDirAsHomeHook
|
||||
];
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
@ -46,8 +51,6 @@ buildGoModule rec {
|
||||
install -Dm444 README.md -t $out/share/docs/apx
|
||||
install -Dm444 COPYING.md $out/share/licenses/apx/LICENSE
|
||||
|
||||
# Create a temp writable home-dir so apx outputs completions without error
|
||||
export HOME=$(mktemp -d)
|
||||
# apx command now works (for completions)
|
||||
# though complains "Error: no such file or directory"
|
||||
installShellCompletion --cmd apx \
|
||||
@ -56,12 +59,12 @@ buildGoModule rec {
|
||||
--zsh <($out/bin/apx completion zsh)
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Vanilla OS package manager";
|
||||
homepage = "https://github.com/Vanilla-OS/apx";
|
||||
changelog = "https://github.com/Vanilla-OS/apx/releases/tag/v${version}";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [
|
||||
license = lib.licenses.gpl3Only;
|
||||
maintainers = with lib.maintainers; [
|
||||
dit7ya
|
||||
chewblacka
|
||||
];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user