2021-07-14 22:03:04 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitea, mage, writeShellScriptBin, nixosTests }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "vikunja-api";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "0.20.4";
|
2021-07-14 22:03:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitea {
|
|
|
|
domain = "kolaente.dev";
|
|
|
|
owner = "vikunja";
|
|
|
|
repo = "api";
|
|
|
|
rev = "v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-SkZf8LFU4/HFEWVEEj7Gl2jVwIL834GRwyua4cw9nh4=";
|
2021-07-14 22:03:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs =
|
|
|
|
let
|
|
|
|
fakeGit = writeShellScriptBin "git" ''
|
|
|
|
if [[ $@ = "describe --tags --always --abbrev=10" ]]; then
|
|
|
|
echo "${version}"
|
|
|
|
else
|
|
|
|
>&2 echo "Unknown command: $@"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
in [ fakeGit mage ];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
vendorHash = "sha256-TY6xJnz6phIrybZ2Ix7xwuMzGQ1f0xk0KwgPnaTaKYw=";
|
2021-07-14 22:03:04 +00:00
|
|
|
|
|
|
|
# checks need to be disabled because of needed internet for some checks
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
|
|
|
|
# Fixes "mkdir /homeless-shelter: permission denied" - "Error: error compiling magefiles" during build
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
mage build:build
|
|
|
|
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
install -Dt $out/bin vikunja
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.tests.vikunja = nixosTests.vikunja;
|
|
|
|
|
|
|
|
meta = {
|
2023-02-09 11:40:11 +00:00
|
|
|
changelog = "https://kolaente.dev/vikunja/api/src/tag/v${version}/CHANGELOG.md";
|
2021-07-14 22:03:04 +00:00
|
|
|
description = "API of the Vikunja to-do list app";
|
|
|
|
homepage = "https://vikunja.io/";
|
|
|
|
license = lib.licenses.agpl3Plus;
|
2022-06-16 17:23:12 +00:00
|
|
|
maintainers = with lib.maintainers; [ leona ];
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "vikunja";
|
2021-07-14 22:03:04 +00:00
|
|
|
platforms = lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|