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-02-19 19:06:45 +00:00
|
|
|
version = "2.0.28";
|
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-02-19 19:06:45 +00:00
|
|
|
sha256 = "sha256-XvQhLqGP1TliSrIm55dP04yGoOMnHmcI2gH00SYVLVY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-19 19:06:45 +00:00
|
|
|
vendorSha256 = "sha256-NKpMLjro06gWN2Xu5M+xM4hVNvlOZ12F3Jv+bL5E0I8=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|