Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at fix-function-merge 49 lines 1.1 kB view raw
1{ lib 2, stdenv 3, buildNpmPackage 4, fetchFromGitHub 5, pkg-config 6, libsecret 7, darwin 8, python3 9, testers 10, vsce 11}: 12 13buildNpmPackage rec { 14 pname = "vsce"; 15 version = "2.31.1"; 16 17 src = fetchFromGitHub { 18 owner = "microsoft"; 19 repo = "vscode-vsce"; 20 rev = "v${version}"; 21 hash = "sha256-VXZBuaJn0VGpq1sIwsp+OcYErYShTCcU/FnTgDHmf7g="; 22 }; 23 24 npmDepsHash = "sha256-Ftf6m5gRcYnkYfRx9vUys9uax8pwyyjUbfw3am8WriA="; 25 26 postPatch = '' 27 substituteInPlace package.json --replace '"version": "0.0.0"' '"version": "${version}"' 28 ''; 29 30 nativeBuildInputs = [ pkg-config python3 ]; 31 32 buildInputs = [ libsecret ] 33 ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit Security ]); 34 35 makeCacheWritable = true; 36 npmFlags = [ "--legacy-peer-deps" ]; 37 38 passthru.tests.version = testers.testVersion { 39 package = vsce; 40 }; 41 42 meta = with lib; { 43 homepage = "https://github.com/microsoft/vscode-vsce"; 44 description = "Visual Studio Code Extension Manager"; 45 maintainers = with maintainers; [ aaronjheng ]; 46 license = licenses.mit; 47 mainProgram = "vsce"; 48 }; 49}