2021-02-05 17:12:51 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, nixosTests }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
let
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "miniflux";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "2.0.31";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
in buildGoModule {
|
|
|
|
inherit pname version;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "sha256-01v5gwUv0SfX/9AJgo4HiBcmoCfQbnKIGcS26IebU2Q=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
vendorSha256 = "sha256-69iTdrjgBmJHeVa8Tq47clQR5Xhy4rWcp2OwS4nIw/c=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
checkPhase = ''
|
|
|
|
go test $(go list ./... | grep -v client)
|
|
|
|
''; # skip client tests as they require network access
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildFlagsArray = ''
|
2020-05-29 06:06:01 +00:00
|
|
|
-ldflags=-s -w -X miniflux.app/version.Version=${version}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
2020-05-15 21:57:56 +00:00
|
|
|
mv $out/bin/miniflux.app $out/bin/miniflux
|
2020-09-25 04:45:31 +00:00
|
|
|
installManPage miniflux.1
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
passthru.tests = nixosTests.miniflux;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Minimalist and opinionated feed reader";
|
|
|
|
homepage = "https://miniflux.app/";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ rvolosatovs benpye ];
|
|
|
|
};
|
|
|
|
}
|