continuous-integration/drone/push Build is passing
This PR adds a declarative integration testing setup which includes 2 local VMs client and server which can be started and stopped via a command. The VMs are run with QEMU and created by https://github.com/microvm-nix/microvm.nix The key pair is generated for this use case and is safe to commit, it resolves the problem that the readFile function can only be used with git tracked files. --------- Co-authored-by: devydave <yannick-dev@tutanota.com> Reviewed-on: #902 Reviewed-by: p4u1 <133+p4u1@noreply.git.coopcloud.tech> Co-authored-by: devydave <bittedanke@tutanota.com>
55 lines
1.2 KiB
Nix
55 lines
1.2 KiB
Nix
{
|
|
buildGo126Module,
|
|
fetchgit,
|
|
lib,
|
|
installShellFiles,
|
|
}:
|
|
|
|
buildGo126Module rec {
|
|
pname = "abra";
|
|
version = "0.13.0-beta";
|
|
rev = "06a57ded025a43c80f94d4e65299add8a31830dc";
|
|
|
|
src = fetchgit {
|
|
url = "https://git.coopcloud.tech/toolshed/abra.git";
|
|
tag = version;
|
|
hash = "sha256-rgoK0TY0WLSQ39lPvVM80zW/qJF40VFBSxYDOaKXZQo=";
|
|
};
|
|
|
|
vendorHash = null;
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
];
|
|
|
|
env.CGO_ENABLED = 0;
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
go build -ldflags="-s -w -X 'main.Commit=${rev}' -X 'main.Version=${version}'" ./cmd/abra
|
|
runHook postBuild
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
install -D abra $out/bin/abra
|
|
runHook postInstall
|
|
'';
|
|
|
|
postInstall = ''
|
|
export ABRA_DIR="$out"
|
|
$out/bin/abra autocomplete bash >abra.bash
|
|
$out/bin/abra autocomplete fish >abra.fish
|
|
$out/bin/abra autocomplete zsh >abra.zsh
|
|
installShellCompletion abra.{bash,fish,zsh}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "The Co-op Cloud utility belt";
|
|
homepage = "https://docs.coopcloud.tech/abra";
|
|
changelog = "https://git.coopcloud.tech/toolshed/abra/releases/tag/${version}";
|
|
mainProgram = "abra";
|
|
license = licenses.gpl3Plus;
|
|
maintainers = "devydave";
|
|
};
|
|
}
|