recipes.nix/packages/autobrr/default.nix

29 lines
730 B
Nix
Raw Normal View History

2024-11-03 19:11:03 +05:30
{ lib
, buildGoModule
, fetchFromGitHub
, callPackage
, nodejs
, pnpm
}:
let
inherit (import ./sources.nix { inherit fetchFromGitHub; }) pname version src vendorHash;
web = callPackage ./web.nix { inherit nodejs pnpm fetchFromGitHub; };
in
buildGoModule rec {
inherit pname version src vendorHash;
ldflags = [ "-s" "-w" "-X main.commit=${src.rev}" "-X main.tag=${version}" ];
postPatch = ''
cp -r ${web}/share/autobrr-web/* web/dist/
'';
meta = {
description = "Modern, easy to use download automation for torrents and usenet";
homepage = "https://github.com/autobrr/autobrr";
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [ adtya ];
mainProgram = "autobrr";
};
}