Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildNpmPackage, 4 fetchFromGitHub, 5 pkg-config, 6 libsecret, 7 python3, 8 testers, 9 vsce, 10 nix-update-script, 11}: 12 13buildNpmPackage (finalAttrs: { 14 pname = "vsce"; 15 version = "3.6.0"; 16 17 src = fetchFromGitHub { 18 owner = "microsoft"; 19 repo = "vscode-vsce"; 20 rev = "v${finalAttrs.version}"; 21 hash = "sha256-6Tt7IewbCLHG8DVoD8PV6VmrNu3MCUHITgYFq9smvOo="; 22 }; 23 24 npmDepsHash = "sha256-pZUDui2mhGe+My9QL+pqeBU16AyJ+/udULbo2EQjZd0="; 25 26 postPatch = '' 27 substituteInPlace package.json --replace-fail '"version": "0.0.0"' '"version": "${finalAttrs.version}"' 28 ''; 29 30 nativeBuildInputs = [ 31 pkg-config 32 python3 33 ]; 34 35 buildInputs = [ libsecret ]; 36 37 makeCacheWritable = true; 38 npmFlags = [ "--legacy-peer-deps" ]; 39 40 passthru = { 41 tests.version = testers.testVersion { 42 package = vsce; 43 }; 44 updateScript = nix-update-script { 45 extraArgs = [ 46 "--version-regex" 47 "^v(\\d+\\.\\d+\\.\\d+)$" 48 ]; 49 }; 50 }; 51 52 meta = { 53 homepage = "https://github.com/microsoft/vscode-vsce"; 54 description = "Visual Studio Code Extension Manager"; 55 maintainers = with lib.maintainers; [ aaronjheng ]; 56 license = lib.licenses.mit; 57 mainProgram = "vsce"; 58 }; 59})