Skip to content

Commit

Permalink
autobrr: init at 1.51.0
Browse files Browse the repository at this point in the history
  • Loading branch information
av-gal committed Nov 25, 2024
1 parent 118645f commit abc5d24
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions pkgs/by-name/au/autobrr/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{ lib, cacert, buildGoModule, fetchFromGitHub, stdenvNoCC, nix-update-script
, nodejs, nodePackages, pnpm_9, typescript }:

let
pname = "autobrr";
version = "1.51.0";
src = fetchFromGitHub {
owner = "autobrr";
repo = "autobrr";
rev = "v${version}";
hash = "sha256-Q0rh/+m0DK/F9NdbzAbg9A5mqC2brPp/plLi/w9F0TE=";
};

autobrr-web = stdenvNoCC.mkDerivation {
pname = "${pname}-web";
inherit src version;

nativeBuildInputs = [ nodejs pnpm_9.configHook typescript ];

sourceRoot = "${src.name}/web";

pnpmDeps = pnpm_9.fetchDeps {
inherit (autobrr-web) pname version src sourceRoot;
hash = "sha256-TcfxE18nkOSxa4UG2euK1hViPw8tY0TS6tayGJsNNog=";
};

postBuild = ''
pnpm run build
'';

installPhase = ''
cp -r dist $out
'';
};
in buildGoModule rec {
inherit autobrr-web pname version src;

vendorHash = "sha256-6KmzsaYgGXA1B1+gaD0I9/zPmdA2JesisfGMjO4E4qc=";

preBuild = "cp -r ${autobrr-web}/* web/dist";

ldflags =
[ "-s" "-w" "-X main.version=${version}" "-X main.commit=${src.rev}" ];

passthru.updateScript = nix-update-script { };

meta = with lib; {
description =
"Modern, easy to use download automation for torrents and usenet";
license = licenses.gpl2Plus;
homepage = "https://autobrr.com/";
maintainers = with maintainers; [ av-gal ];
mainProgram = "autobrr";
};
}

0 comments on commit abc5d24

Please sign in to comment.