use jq for vscode extention rewrite
This commit is contained in:
parent
adc4490673
commit
1d8018a463
1 changed files with 11 additions and 8 deletions
|
|
@ -7,15 +7,18 @@
|
||||||
];
|
];
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
(pkgs.vscodium.overrideAttrs (oldAttrs: {
|
(pkgs.vscodium.overrideAttrs (oldAttrs: {
|
||||||
|
nativeBuildInputs = (oldAttrs.nativeBuildInputs or []) ++ [ pkgs.jq ];
|
||||||
postInstall = (oldAttrs.postInstall or "") + ''
|
postInstall = (oldAttrs.postInstall or "") + ''
|
||||||
substituteInPlace $out/Applications/VSCodium.app/Contents/Resources/app/product.json \
|
productJson=$out/Applications/VSCodium.app/Contents/Resources/app/product.json
|
||||||
--replace '"extensionsGallery": {}' '"extensionsGallery": {
|
tmp=$(mktemp)
|
||||||
"serviceUrl": "https://visualstudio.com",
|
jq '.extensionsGallery = {
|
||||||
"cacheUrl": "https://windows.net",
|
serviceUrl: "https://marketplace.visualstudio.com/_apis/public/gallery",
|
||||||
"itemUrl": "https://visualstudio.com",
|
cacheUrl: "https://vscode.blob.core.windows.net/gallery/index",
|
||||||
"controlUrl": "https://msecnd.net",
|
itemUrl: "https://marketplace.visualstudio.com/items",
|
||||||
"recommendationsUrl": "https://visualstudio.com/recommendations"
|
controlUrl: "",
|
||||||
}'
|
recommendationsUrl: ""
|
||||||
|
}' "$productJson" > "$tmp"
|
||||||
|
mv "$tmp" "$productJson"
|
||||||
'';
|
'';
|
||||||
}))
|
}))
|
||||||
git
|
git
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue