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