1 { lib, fetchFromGitHub, stdenv, nodejs, pnpm, buildGoModule, mage, writeShellScriptBin, nixosTests }:
5 src = fetchFromGitHub {
9 hash = "sha256-h3Jz28HYQYZC+oWGXNeKv2iNsrU0gbBRfWgOvuKijtw=";
12 frontend = stdenv.mkDerivation (finalAttrs: {
13 pname = "vikunja-frontend";
16 sourceRoot = "${finalAttrs.src.name}/frontend";
18 pnpmDeps = pnpm.fetchDeps {
19 inherit (finalAttrs) pname version src sourceRoot;
20 hash = "sha256-pp4AZnoI7gON/meZalfXmaliKR/wSjkj9GTX3My678s=";
35 pnpm run test:unit --run
43 # Injects a `t.Skip()` into a given test since there's apparently no other way to skip tests here.
44 skipTest = lineOffset: testCase: file:
46 jumpAndAppend = lib.concatStringsSep ";" (lib.replicate (lineOffset - 1) "n" ++ [ "a" ]);
48 sed -i -e '/${testCase}/{
49 ${jumpAndAppend} t.Skip();
59 fakeGit = writeShellScriptBin "git" ''
60 if [[ $@ = "describe --tags --always --abbrev=10" ]]; then
63 >&2 echo "Unknown command: $@"
70 vendorHash = "sha256-d2BNzsBeWlpZGbU7PkXWO5e9FLJA/Wda5ImXwqh/WV4=";
75 cp -r ${frontend} frontend/dist
79 # These tests need internet, so we skip them.
80 ${skipTest 1 "TestConvertTrelloToVikunja" "pkg/modules/migration/trello/trello_test.go"}
81 ${skipTest 1 "TestConvertTodoistToVikunja" "pkg/modules/migration/todoist/todoist_test.go"}
87 # Fixes "mkdir /homeless-shelter: permission denied" - "Error: error compiling magefiles" during build
88 export HOME=$(mktemp -d)
101 install -Dt $out/bin vikunja
105 passthru.tests.vikunja = nixosTests.vikunja;
108 changelog = "https://kolaente.dev/vikunja/api/src/tag/v${version}/CHANGELOG.md";
109 description = "Todo-app to organize your life";
110 homepage = "https://vikunja.io/";
111 license = lib.licenses.agpl3Plus;
112 maintainers = with lib.maintainers; [ leona ];
113 mainProgram = "vikunja";
114 platforms = lib.platforms.linux;