nixpkgs/pkgs/by-name/vs/vsce/package.nix
2025-02-02 14:20:53 +00:00

60 lines
1.2 KiB
Nix

{
lib,
buildNpmPackage,
fetchFromGitHub,
pkg-config,
libsecret,
python3,
testers,
vsce,
nix-update-script,
}:
buildNpmPackage rec {
pname = "vsce";
version = "3.2.2";
src = fetchFromGitHub {
owner = "microsoft";
repo = "vscode-vsce";
rev = "v${version}";
hash = "sha256-zWs3DVb9BThCdjqQLfK4Z6wvph3oibVBdj+h3n33Lns=";
};
npmDepsHash = "sha256-9tD2an6878XEXWbO5Jsplibd6lbzNBufdHJJ89mjMig=";
postPatch = ''
substituteInPlace package.json --replace-fail '"version": "0.0.0"' '"version": "${version}"'
'';
nativeBuildInputs = [
pkg-config
python3
];
buildInputs = [ libsecret ];
makeCacheWritable = true;
npmFlags = [ "--legacy-peer-deps" ];
passthru = {
tests.version = testers.testVersion {
package = vsce;
};
updateScript = nix-update-script {
extraArgs = [
"--version-regex"
"^v(\\d+\\.\\d+\\.\\d+)$"
];
};
};
meta = {
homepage = "https://github.com/microsoft/vscode-vsce";
description = "Visual Studio Code Extension Manager";
maintainers = with lib.maintainers; [ aaronjheng ];
license = lib.licenses.mit;
mainProgram = "vsce";
};
}