opensrc: init at 0.7.2

This commit is contained in:
airRnot1106
2026-04-21 21:35:56 +09:00
parent 38b0bb1ac0
commit 382a86a5fe
+39
View File
@@ -0,0 +1,39 @@
{
lib,
rustPlatform,
fetchFromGitHub,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "opensrc";
version = "0.7.2";
__structuredAttrs = true;
strictDeps = true;
src = fetchFromGitHub {
owner = "vercel-labs";
repo = "opensrc";
tag = "v${finalAttrs.version}";
hash = "sha256-t7QVes9MN8JsJMGtKsTUnErZDRbzGXsIOBpKJxumvFg=";
};
sourceRoot = "${finalAttrs.src.name}/packages/opensrc/cli";
cargoHash = "sha256-ol4MoeOqKtmVhdljp/264/vNoRsPPJHY6rsmuaohT/E=";
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
passthru.updateScript = nix-update-script { };
meta = {
description = "Fetch source code for npm packages to give AI coding agents deeper context";
homepage = "https://github.com/vercel-labs/opensrc";
changelog = "https://github.com/vercel-labs/opensrc/blob/${finalAttrs.src.rev}/CHANGELOG.md";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ airrnot ];
mainProgram = "opensrc";
platforms = lib.platforms.all;
};
})