Merge pull request #319416 from rnhmjoj/pr-magnetico

magnetico: fix build
This commit is contained in:
Michele Guerini Rocco 2024-06-14 00:41:10 +02:00 committed by GitHub
commit e6a494be5d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,10 +1,12 @@
{ lib
, fetchFromGitHub
, fetchpatch
, nixosTests
, buildGoModule
, sqlite
}:
buildGoModule rec {
buildGoModule {
pname = "magnetico";
version = "unstable-2022-08-10";
@ -12,10 +14,20 @@ buildGoModule rec {
owner = "ireun";
repo = "magnetico";
rev = "828e230d3b3c0759d3274e27f5a7b70400f4d6ea";
sha256 = "sha256-V1pBzillWTk9iuHAhFztxYaq4uLL3U3HYvedGk6ffbk=";
hash = "sha256-V1pBzillWTk9iuHAhFztxYaq4uLL3U3HYvedGk6ffbk=";
};
vendorHash = "sha256-ngYkTtBEZSyYYnfBHi0VrotwKGvMOiowbrwigJnjsuU=";
patches = [
# https://github.com/ireun/magnetico/pull/15
(fetchpatch {
url = "https://github.com/ireun/magnetico/commit/90db34991aa44af9b79ab4710c638607c6211c1c.patch";
hash = "sha256-wC9lVQqfngQ5AaRgb4TtoWSgbQ2iSHeQ2UBDUyWjMK8=";
})
];
vendorHash = "sha256-JDrBXjnQAcWp8gKvnm+q1F5oV+FozKUvhHK/Me/Cyj8=";
buildInputs = [ sqlite ];
buildPhase = ''
runHook preBuild
@ -26,18 +38,16 @@ buildGoModule rec {
'';
checkPhase = ''
runHook preBuild
runHook preCheck
make test
runHook postBuild
runHook postCheck
'';
passthru.tests = { inherit (nixosTests) magnetico; };
meta = with lib; {
# Build fails with Go >=1.21, couldn't be fixed by updating module dependencies.
broken = true;
description = "Autonomous (self-hosted) BitTorrent DHT search engine suite";
homepage = "https://github.com/ireun/magnetico";
license = licenses.agpl3Only;