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; [
|
||||
(pkgs.vscodium.overrideAttrs (oldAttrs: {
|
||||
nativeBuildInputs = (oldAttrs.nativeBuildInputs or []) ++ [ pkgs.jq ];
|
||||
postInstall = (oldAttrs.postInstall or "") + ''
|
||||
substituteInPlace $out/Applications/VSCodium.app/Contents/Resources/app/product.json \
|
||||
--replace '"extensionsGallery": {}' '"extensionsGallery": {
|
||||
"serviceUrl": "https://visualstudio.com",
|
||||
"cacheUrl": "https://windows.net",
|
||||
"itemUrl": "https://visualstudio.com",
|
||||
"controlUrl": "https://msecnd.net",
|
||||
"recommendationsUrl": "https://visualstudio.com/recommendations"
|
||||
}'
|
||||
productJson=$out/Applications/VSCodium.app/Contents/Resources/app/product.json
|
||||
tmp=$(mktemp)
|
||||
jq '.extensionsGallery = {
|
||||
serviceUrl: "https://marketplace.visualstudio.com/_apis/public/gallery",
|
||||
cacheUrl: "https://vscode.blob.core.windows.net/gallery/index",
|
||||
itemUrl: "https://marketplace.visualstudio.com/items",
|
||||
controlUrl: "",
|
||||
recommendationsUrl: ""
|
||||
}' "$productJson" > "$tmp"
|
||||
mv "$tmp" "$productJson"
|
||||
'';
|
||||
}))
|
||||
git
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue