nixpkgs/pkgs/servers/miniflux/default.nix
2021-01-31 13:15:11 +00:00

43 lines
1020 B
Nix

{ lib, buildGoModule, fetchFromGitHub, installShellFiles, nixosTests }:
let
pname = "miniflux";
version = "2.0.27";
in buildGoModule {
inherit pname version;
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = version;
sha256 = "0sl1hxdybafzpa1bi22b8r4fxdzwynr012ga5jvwcn2rcxbdbd8z";
};
vendorSha256 = "183whf29zq771rq0z4008gwaps1iipb0m9kp6xyizbnzafwm3zwm";
nativeBuildInputs = [ installShellFiles ];
checkPhase = ''
go test $(go list ./... | grep -v client)
''; # skip client tests as they require network access
buildFlagsArray = ''
-ldflags=-s -w -X miniflux.app/version.Version=${version}
'';
postInstall = ''
mv $out/bin/miniflux.app $out/bin/miniflux
installManPage miniflux.1
'';
passthru.tests = nixosTests.miniflux;
meta = with lib; {
description = "Minimalist and opinionated feed reader";
homepage = "https://miniflux.app/";
license = licenses.asl20;
maintainers = with maintainers; [ rvolosatovs benpye ];
};
}