+1
-25
pkgs/applications/editors/vscode/extensions/default.nix
+1
-25
pkgs/applications/editors/vscode/extensions/default.nix
···
1431
1431
};
1432
1432
};
1433
1433
1434
-
eamodio.gitlens = buildVscodeMarketplaceExtension {
1435
-
mktplcRef = {
1436
-
name = "gitlens";
1437
-
publisher = "eamodio";
1438
-
# Stable versions are listed on the GitHub releases page and use a
1439
-
# semver scheme, contrary to preview versions which are listed on
1440
-
# the VSCode Marketplace and use a calver scheme. We should avoid
1441
-
# using preview versions, because they expire after two weeks.
1442
-
version = "17.4.1";
1443
-
hash = "sha256-H14LJ1diURp6dtZE5djSmvI7aJFBnwVAj7Qi7VFf5oo=";
1444
-
};
1445
-
meta = {
1446
-
changelog = "https://marketplace.visualstudio.com/items/eamodio.gitlens/changelog";
1447
-
description = "Visual Studio Code extension that improves its built-in Git capabilities";
1448
-
longDescription = ''
1449
-
Supercharge the Git capabilities built into Visual Studio Code — Visualize code authorship at a glance via Git
1450
-
blame annotations and code lens, seamlessly navigate and explore Git repositories, gain valuable insights via
1451
-
powerful comparison commands, and so much more
1452
-
'';
1453
-
downloadPage = "https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens";
1454
-
homepage = "https://gitlens.amod.io/";
1455
-
license = lib.licenses.mit;
1456
-
maintainers = [ lib.maintainers.ratsclub ];
1457
-
};
1458
-
};
1434
+
eamodio.gitlens = callPackage ./eamodio.gitlens { };
1459
1435
1460
1436
earthly.earthfile-syntax-highlighting = buildVscodeMarketplaceExtension {
1461
1437
mktplcRef = {
+98
pkgs/applications/editors/vscode/extensions/eamodio.gitlens/default.nix
+98
pkgs/applications/editors/vscode/extensions/eamodio.gitlens/default.nix
···
1
+
{
2
+
lib,
3
+
pkgs,
4
+
stdenvNoCC,
5
+
fetchFromGitHub,
6
+
pnpm,
7
+
nodejs,
8
+
vscode-utils,
9
+
nix-update-script,
10
+
}:
11
+
12
+
let
13
+
vsix = stdenvNoCC.mkDerivation (finalAttrs: {
14
+
name = "gitlens-${finalAttrs.version}.zip";
15
+
pname = "gitlens-vsix";
16
+
version = "17.5.1";
17
+
18
+
src = fetchFromGitHub {
19
+
owner = "gitkraken";
20
+
repo = "vscode-gitlens";
21
+
tag = "v${finalAttrs.version}";
22
+
hash = "sha256-DGV4liUpJNM6ktMy3jQ1iEQ7H5mPM17f0uqA8QYHoLc=";
23
+
};
24
+
25
+
pnpmDeps = pnpm.fetchDeps {
26
+
inherit (finalAttrs) pname version src;
27
+
fetcherVersion = 2;
28
+
hash = "sha256-Lx8YRG3B3t83t85PqDMevIm7M0ks2IsluwL1I5zThdA=";
29
+
};
30
+
31
+
postPatch = ''
32
+
substituteInPlace scripts/generateLicenses.mjs --replace-fail 'https://raw.githubusercontent.com/microsoft/vscode/refs/heads/main/LICENSE.txt' '${pkgs.vscode-json-languageserver.src}/LICENSE.txt'
33
+
'';
34
+
35
+
nativeBuildInputs = [
36
+
nodejs
37
+
pnpm.configHook
38
+
pnpm
39
+
];
40
+
41
+
# Error: spawn /build/source/node_modules/.pnpm/sass-embedded-linux-x64@1.77.8/node_modules/sass-embedded-linux-x64/dart-sass/src/dart ENOENT
42
+
# Remove both node_modules/.pnpm/sass-embedded and node_modules/.pnpm/sass-embedded-linux-x64
43
+
preBuild = ''
44
+
rm -r node_modules/.pnpm/sass-embedded*
45
+
'';
46
+
47
+
buildPhase = ''
48
+
runHook preBuild
49
+
50
+
node --run package
51
+
52
+
runHook postBuild
53
+
'';
54
+
55
+
installPhase = ''
56
+
runHook preInstall
57
+
58
+
cp ./gitlens-$version.vsix $out
59
+
60
+
runHook postInstall
61
+
'';
62
+
});
63
+
in
64
+
vscode-utils.buildVscodeExtension (finalAttrs: {
65
+
pname = "gitlens";
66
+
inherit (finalAttrs.src) version;
67
+
68
+
vscodeExtPublisher = "eamodio";
69
+
vscodeExtName = "gitlens";
70
+
vscodeExtUniqueId = "${finalAttrs.vscodeExtPublisher}.${finalAttrs.vscodeExtName}";
71
+
72
+
src = vsix;
73
+
74
+
passthru = {
75
+
vsix = finalAttrs.src;
76
+
updateScript = nix-update-script {
77
+
attrPath = "vscode-extensions.eamodio.gitlens.vsix";
78
+
};
79
+
};
80
+
81
+
meta = {
82
+
changelog = "https://marketplace.visualstudio.com/items/eamodio.gitlens/changelog";
83
+
description = "Visual Studio Code extension that improves its built-in Git capabilities";
84
+
longDescription = ''
85
+
Supercharge the Git capabilities built into Visual Studio Code — Visualize code authorship at a glance via Git
86
+
blame annotations and code lens, seamlessly navigate and explore Git repositories, gain valuable insights via
87
+
powerful comparison commands, and so much more
88
+
'';
89
+
downloadPage = "https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens";
90
+
homepage = "https://gitlens.amod.io/";
91
+
license = lib.licenses.mit;
92
+
sourceProvenance = with lib.sourceTypes; [ fromSource ];
93
+
maintainers = with lib.maintainers; [
94
+
xiaoxiangmoe
95
+
ratsclub
96
+
];
97
+
};
98
+
})