From 61b868358e019ae436a1b1c8e6fc4cee2a3aee1d Mon Sep 17 00:00:00 2001 From: adam Date: Sun, 2 Nov 2025 20:04:44 +0100 Subject: [PATCH] nvrs: init at 0.1.9 Co-authored-by: azey Signed-off-by: adam --- pkgs/by-name/nv/nvrs/package.nix | 56 ++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 pkgs/by-name/nv/nvrs/package.nix diff --git a/pkgs/by-name/nv/nvrs/package.nix b/pkgs/by-name/nv/nvrs/package.nix new file mode 100644 index 000000000000..e0509633fe8c --- /dev/null +++ b/pkgs/by-name/nv/nvrs/package.nix @@ -0,0 +1,56 @@ +{ + lib, + nix-update-script, + fetchFromGitHub, + rustPlatform, + pkg-config, + openssl, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "nvrs"; + version = "0.1.9"; + + src = fetchFromGitHub { + owner = "adamperkowski"; + repo = "nvrs"; + tag = "v${finalAttrs.version}"; + hash = "sha256-6ATkebFYuOOvhzSO+gClPbtaz9/Zph4m8/cqkufRYFw="; + }; + + cargoHash = "sha256-h3egaj4RQImxIf0MB8ZM9V92Xlml5BK++s7RJQwAk+E="; + + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ openssl ]; + + buildFeatures = [ "cli" ]; + cargoBuildFlags = [ + "--bin" + "nvrs" + ]; + + # Skip tests that rely on network access. + # We're also not running cli tokio tests because they don't implement skipping functionality. + cargoTestFlags = [ + "--lib" + "--" + "--skip=api::aur::request_test" + "--skip=api::crates_io::request_test" + "--skip=api::gitea::request_test" + "--skip=api::github::request_test" + "--skip=api::gitlab::request_test" + "--skip=api::regex::request_test" + ]; + + passthru.update-script = nix-update-script { }; + + meta = { + description = "Fast new version checker for software releases"; + homepage = "https://nvrs.adamperkowski.dev"; + changelog = "https://github.com/adamperkowski/nvrs/blob/v${finalAttrs.version}/CHANGELOG.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ adamperkowski ]; + mainProgram = "nvrs"; + platforms = lib.platforms.linux; + }; +})