depot/third_party/nixpkgs/pkgs/development/tools/vsce/default.nix

48 lines
980 B
Nix
Raw Normal View History

{ lib
, stdenv
, buildNpmPackage
, fetchFromGitHub
, pkg-config
, libsecret
, python3
, testers
, vsce
}:
buildNpmPackage rec {
pname = "vsce";
version = "2.15.0";
src = fetchFromGitHub {
owner = "microsoft";
repo = "vscode-vsce";
rev = "v${version}";
hash = "sha256-WDKOHQV6J22l0ELmXwl5BC5x7MsI6TAMeU3oBFpwqx4=";
};
npmDepsHash = "sha256-i2LpQ/4MwkUGTUhih0ybLv5np45j7m4kCx9IOBIgtXo=";
postPatch = ''
substituteInPlace package.json --replace '"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;
};
meta = with lib; {
homepage = "https://github.com/microsoft/vscode-vsce";
description = "Visual Studio Code Extension Manager";
maintainers = with maintainers; [ aaronjheng ];
license = licenses.mit;
};
}