nixpkgs/pkgs/servers/miniflux/default.nix
2023-10-18 14:46:28 -04:00

40 lines
989 B
Nix

{ lib, buildGo121Module, fetchFromGitHub, installShellFiles, nixosTests }:
let
pname = "miniflux";
version = "2.0.49";
in buildGo121Module {
inherit pname version;
src = fetchFromGitHub {
owner = pname;
repo = "v2";
rev = version;
sha256 = "sha256-MGKQSlpTLqQPmvhACl9fbQkz2Uil8V8btjTwJIcY7g0=";
};
vendorHash = "sha256-J3WHFfmjgE71hK58WP3dq+Px4XxLbluJSGv+eJiIB0E=";
nativeBuildInputs = [ installShellFiles ];
checkFlags = [ "-skip=TestClient" ]; # skip client tests as they require network access
ldflags = [
"-s" "-w" "-X miniflux.app/v2/internal/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 ];
};
}