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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.1 KiB
Nix
Raw Normal View History

2022-10-23 01:02:33 +00:00
{ lib
2023-05-20 22:30:06 +00:00
, stdenv
2022-10-23 01:02:33 +00:00
, buildNpmPackage
, fetchFromGitHub
, pkg-config
, libsecret
2023-05-20 22:30:06 +00:00
, darwin
2022-10-23 01:02:33 +00:00
, python3
, testers
, vsce
}:
buildNpmPackage rec {
pname = "vsce";
2023-12-02 11:30:33 +00:00
version = "2.22.0";
2022-10-23 01:02:33 +00:00
src = fetchFromGitHub {
owner = "microsoft";
repo = "vscode-vsce";
rev = "v${version}";
2023-12-02 11:30:33 +00:00
hash = "sha256-zpZ/PsqZ9yRDKTXkSrcBgSxYer7JdjNZqsseHwfzkEY=";
2022-10-23 01:02:33 +00:00
};
2023-08-31 08:30:28 +00:00
npmDepsHash = "sha256-Difk9a9TYmfwzP9SawEuaxm7iHVjdfO+FxFCE7aEMzM=";
2022-10-23 01:02:33 +00:00
postPatch = ''
substituteInPlace package.json --replace '"version": "0.0.0"' '"version": "${version}"'
'';
nativeBuildInputs = [ pkg-config python3 ];
2023-05-20 22:30:06 +00:00
buildInputs = [ libsecret ]
++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit Security ]);
2022-10-23 01:02:33 +00:00
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;
};
}