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