From 2e803153e69d9b97e780dba78efd0988548ae609 Mon Sep 17 00:00:00 2001 From: redyf Date: Sun, 23 Mar 2025 21:41:14 -0300 Subject: [PATCH] nyaa: init at 0.9.1 Adds github.com/Beastwick18/nyaa to nixpkgs refactor: Update license Co-authored-by: emaryn <197520219+emaryn@users.noreply.github.com> refactor: Update Package description Co-authored-by: emaryn <197520219+emaryn@users.noreply.github.com> refactor: Switch from rev to tag Co-authored-by: emaryn <197520219+emaryn@users.noreply.github.com> --- pkgs/by-name/ny/nyaa/package.nix | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pkgs/by-name/ny/nyaa/package.nix diff --git a/pkgs/by-name/ny/nyaa/package.nix b/pkgs/by-name/ny/nyaa/package.nix new file mode 100644 index 000000000000..df6340fb8505 --- /dev/null +++ b/pkgs/by-name/ny/nyaa/package.nix @@ -0,0 +1,37 @@ +{ + fetchFromGitHub, + lib, + nix-update-script, + rustPlatform, + versionCheckHook, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "nyaa"; + version = "0.9.1"; + + src = fetchFromGitHub { + owner = "Beastwick18"; + repo = "nyaa"; + tag = "v${finalAttrs.version}"; + hash = "sha256-WxOGtNMqQoEgztLaitwpE4MusGaLuKMmqi9L4prfOBY="; + }; + + useFetchCargoVendor = true; + cargoHash = "sha256-oCe0Yn0DuwF7rG+MGBGQ0Fsgt3c4Wju7uFkp3+IiP0I="; + + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + + passthru.updateScript = nix-update-script { }; + + meta = { + changelog = "https://github.com/Beastwick18/nyaa/releases/tag/v${finalAttrs.version}"; + description = "Tui tool for browsing and downloading torrents"; + homepage = "https://github.com/Beastwick18/nyaa"; + license = lib.licenses.gpl3Plus; + mainProgram = "nyaa"; + maintainers = with lib.maintainers; [ redyf ]; + platforms = lib.platforms.unix; + }; +})