From a27f74848fb7718f0f03b13aa0ae9e25d4542778 Mon Sep 17 00:00:00 2001 From: Yiyu Zhou Date: Sun, 4 Jan 2026 02:06:12 -0800 Subject: [PATCH] nxv: init at 0.1.2 --- pkgs/by-name/nx/nxv/package.nix | 42 +++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 pkgs/by-name/nx/nxv/package.nix diff --git a/pkgs/by-name/nx/nxv/package.nix b/pkgs/by-name/nx/nxv/package.nix new file mode 100644 index 000000000000..42087f68caed --- /dev/null +++ b/pkgs/by-name/nx/nxv/package.nix @@ -0,0 +1,42 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + versionCheckHook, + nix-update-script, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "nxv"; + version = "0.1.2"; + + src = fetchFromGitHub { + owner = "jamesbrink"; + repo = "nxv"; + tag = "v${finalAttrs.version}"; + hash = "sha256-tKjb+B65ZrLIJ7aDYGC3kj71iAXoFmAaj5I8+o4EzlM="; + fetchSubmodules = true; + }; + + cargoHash = "sha256-RW3WrG1A/J1xuWWcHOARG6EEmSWWnDeycAtbppY52OI="; + + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgramArg = "--version"; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Find any version of any Nix package instantly"; + longDescription = '' + nxv indexes the entire nixpkgs git history to help you discover + when packages were added, which versions existed, and the exact + commit to use with `nix shell nixpkgs/#package`. + ''; + homepage = "https://nxv.urandom.io"; + changelog = "https://github.com/jamesbrink/nxv/blob/${finalAttrs.src.tag}/CHANGELOG.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ yiyu ]; + mainProgram = "nxv"; + }; +})