diff options
Diffstat (limited to 'pkgs/misc/vscode-extensions')
28 files changed, 2394 insertions, 267 deletions
diff --git a/pkgs/misc/vscode-extensions/cpptools/default.nix b/pkgs/misc/vscode-extensions/cpptools/default.nix index 8c46b242ef4..188da860530 100644 --- a/pkgs/misc/vscode-extensions/cpptools/default.nix +++ b/pkgs/misc/vscode-extensions/cpptools/default.nix @@ -1,4 +1,4 @@ -{ stdenv, vscode-utils +{ lib, vscode-utils , fetchurl, unzip , mono, writeScript, runtimeShell , jq, clang-tools @@ -50,13 +50,13 @@ vscode-utils.buildVscodeMarketplaceExtension rec { mktplcRef = { name = "cpptools"; publisher = "ms-vscode"; - version = "0.29.0"; + version = "1.0.1"; }; vsix = fetchurl { name = "${mktplcRef.publisher}-${mktplcRef.name}.zip"; url = "https://github.com/microsoft/vscode-cpptools/releases/download/${mktplcRef.version}/cpptools-linux.vsix"; - sha256 = "0qw21wd6hfqrmvyvr2ggydcfsk1hralj5x3s8hhwqyspb7szggxi"; + sha256 = "1lb5pza2ny1ydan19596amabs1np10nq08yqsfbvvfw7zbg4gnyc"; }; buildInputs = [ @@ -92,7 +92,7 @@ vscode-utils.buildVscodeMarketplaceExtension rec { chmod a+x ./bin/cpptools{-srv,} ''; - meta = with stdenv.lib; { + meta = with lib; { license = licenses.unfree; maintainers = [ maintainers.jraygauthier ]; # A 32 bit linux would also be possible with some effort (specific download of binaries + diff --git a/pkgs/misc/vscode-extensions/default.nix b/pkgs/misc/vscode-extensions/default.nix index 04eabef9ec3..2941c95bb4e 100644 --- a/pkgs/misc/vscode-extensions/default.nix +++ b/pkgs/misc/vscode-extensions/default.nix @@ -1,209 +1,1532 @@ -{ stdenv, callPackage, vscode-utils, llvmPackages_8 }: +{ config +, lib +, buildEnv +, callPackage +, vscode-utils +, asciidoctor +, nodePackages +, jdk +, llvmPackages_8 +, nixpkgs-fmt +, jq +, shellcheck +, moreutils +, racket-minimal +, clojure-lsp +}: let inherit (vscode-utils) buildVscodeMarketplaceExtension; -in -# -# Unless there is a good reason not to, we attempt to use the same name as the -# extension's unique identifier (the name the extension gets when installed -# from vscode under `~/.vscode`) and found on the marketplace extension page. -# So an extension's attribute name should be of the form: -# "${mktplcRef.publisher}.${mktplcRef.name}". -# -{ - - alanz.vscode-hie-server = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-hie-server"; - publisher = "alanz"; - version = "0.0.27"; # see the note above - sha256 = "1mz0h5zd295i73hbji9ivla8hx02i4yhqcv6l4r23w3f07ql3i8h"; - }; - meta = { - license = stdenv.lib.licenses.mit; - }; - }; - bbenoist.Nix = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "Nix"; - publisher = "bbenoist"; - version = "1.0.1"; - sha256 = "0zd0n9f5z1f0ckzfjr38xw2zzmcxg1gjrava7yahg5cvdcw6l35b"; - }; - meta = with stdenv.lib; { - license = licenses.mit; - }; - }; + # + # Unless there is a good reason not to, we attempt to use the same name as the + # extension's unique identifier (the name the extension gets when installed + # from vscode under `~/.vscode`) and found on the marketplace extension page. + # So an extension's attribute name should be of the form: + # "${mktplcRef.publisher}.${mktplcRef.name}". + # + baseExtensions = self: lib.mapAttrs (_n: lib.recurseIntoAttrs) + { + _4ops.terraform = buildVscodeMarketplaceExtension { + mktplcRef = { + publisher = "4ops"; + name = "terraform"; + version = "0.2.1"; + sha256 = "196026a89pizj8p0hqdgkyllj2spx2qwpynsaqjq17s8v15vk5dg"; + }; + meta = { + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ kamadorueda ]; + }; + }; - cmschuetz12.wal = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "wal"; - publisher = "cmschuetz12"; - version = "0.1.0"; - sha256 = "0q089jnzqzhjfnv0vlb5kf747s3mgz64r7q3zscl66zb2pz5q4zd"; - }; - meta = with stdenv.lib; { - license = licenses.mit; - }; - }; + a5huynh.vscode-ron = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-ron"; + publisher = "a5huynh"; + version = "0.9.0"; + sha256 = "0d3p50mhqp550fmj662d3xklj14gvzvhszm2hlqvx4h28v222z97"; + }; + meta = { + license = lib.licenses.mit; + }; + }; - formulahendry.auto-close-tag = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "auto-close-tag"; - publisher = "formulahendry"; - version = "0.5.6"; - sha256 = "058jgmllqb0j6gg5anghdp35nkykii28igfcwqgh4bp10pyvspg0"; - }; - meta = { - license = stdenv.lib.licenses.mit; - }; - }; + alanz.vscode-hie-server = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-hie-server"; + publisher = "alanz"; + version = "0.0.27"; # see the note above + sha256 = "1mz0h5zd295i73hbji9ivla8hx02i4yhqcv6l4r23w3f07ql3i8h"; + }; + meta = { + license = lib.licenses.mit; + }; + }; - james-yu.latex-workshop = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "latex-workshop"; - publisher = "James-Yu"; - version = "8.2.0"; - sha256 = "1ai16aam4v5jzhxgms589q0l24kyk1a9in6z4i7g05b3sahyxab2"; - }; - meta = with stdenv.lib; { - license = licenses.mit; - }; - }; + alefragnani.project-manager = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "project-manager"; + publisher = "alefragnani"; + version = "12.1.0"; + sha256 = "sha256-fYBKmWn9pJh2V0fGdqVrXj9zIl8oTrZcBycDaMOXL/8="; + }; + meta = { + license = lib.licenses.mit; + }; + }; - justusadam.language-haskell = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "language-haskell"; - publisher = "justusadam"; - version = "3.2.1"; - sha256 = "0lxp8xz17ciy93nj4lzxqvz71vw1zdyamrnh2n792yair8890rr6"; - }; - meta = { - license = stdenv.lib.licenses.bsd3; - }; - }; + alexdima.copy-relative-path = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "copy-relative-path"; + publisher = "alexdima"; + version = "0.0.2"; + sha256 = "06g601n9d6wyyiz659w60phgm011gn9jj5fy0gf5wpi2bljk3vcn"; + }; + meta = { + license = lib.licenses.mit; + }; + }; - ms-azuretools.vscode-docker = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-docker"; - publisher = "ms-azuretools"; - version = "0.8.1"; - sha256 = "0n59whmcrx8946xix6skvc50f2vsc85ckvn8cs06w9mqmymm1q0s"; - }; - meta = { - license = stdenv.lib.licenses.mit; - }; - }; + alygin.vscode-tlaplus = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-tlaplus"; + publisher = "alygin"; + version = "1.5.3"; + sha256 = "1cy0qn8iyjrinscn9p5ckpsa2hyryapxfi7is6s2zk2mpligbb1d"; + }; + meta = { + license = lib.licenses.mit; + }; + }; - ms-kubernetes-tools.vscode-kubernetes-tools = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-kubernetes-tools"; - publisher = "ms-kubernetes-tools"; - version = "1.0.6"; - sha256 = "12a4phl1pddsajy3n0ld6rp607iy0pif6pqrs6ljbg2x97fyra28"; - }; - meta = { - license = stdenv.lib.licenses.mit; - }; - }; + angular.ng-template = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "ng-template"; + publisher = "Angular"; + version = "12.1.2"; + sha256 = "sha256-fIHh1eRmu4zSgrtZr0XwLB+1Ad6a/0ABC55akGr0DOA="; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/Angular.ng-template/changelog"; + description = "Editor services for Angular templates"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=Angular.ng-template"; + homepage = "https://github.com/angular/vscode-ng-language-service"; + license = licenses.mit; + maintainers = with maintainers; [ ratsclub ]; + }; + }; - ms-vscode.Go = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "Go"; - publisher = "ms-vscode"; - version = "0.11.7"; - sha256 = "1l6jjdfivw1pn9y4d4i7zf80ls1k1b0ap1d828ah57ad3bgmyqfi"; - }; - meta = { - license = stdenv.lib.licenses.mit; - }; - }; + antfu.icons-carbon = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "icons-carbon"; + publisher = "antfu"; + version = "0.2.2"; + sha256 = "0mfap16la09mn0jhvy8s3dainrmjz64vra7d0d4fbcpgg420kv3f"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; - ms-vscode.cpptools = callPackage ./cpptools {}; + arrterian.nix-env-selector = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "nix-env-selector"; + publisher = "arrterian"; + version = "1.0.7"; + sha256 = "0e76885c9dbb6dca4eac8a75866ec372b948cc64a3a3845327d7c3ef6ba42a57"; + }; + meta = { + license = lib.licenses.mit; + }; + }; - ms-vscode-remote.remote-ssh = callPackage ./remote-ssh {}; + asciidoctor.asciidoctor-vscode = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "asciidoctor-vscode"; + publisher = "asciidoctor"; + version = "2.8.9"; + sha256 = "1xkxx5i3nhd0dzqhhdmx0li5jifsgfhv0p5h7xwsscz3gzgsdcyb"; + }; - ms-python.python = callPackage ./python { - extractNuGet = callPackage ./python/extract-nuget.nix { }; - }; + postPatch = '' + substituteInPlace dist/src/text-parser.js \ + --replace "get('asciidoctor_command', 'asciidoctor')" \ + "get('asciidoctor_command', '${asciidoctor}/bin/asciidoctor')" + substituteInPlace dist/src/commands/exportAsPDF.js \ + --replace "get('asciidoctorpdf_command', 'asciidoctor-pdf')" \ + "get('asciidoctorpdf_command', '${asciidoctor}/bin/asciidoctor-pdf')" + ''; - redhat.vscode-yaml = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vscode-yaml"; - publisher = "redhat"; - version = "0.5.3"; - sha256 = "03swlsp906rqlrx6jf3ibh7pk36sm0zdr8jfy6sr3w5lqjg27gka"; - }; - meta = { - license = stdenv.lib.licenses.mit; - }; - }; + meta = with lib; { + license = licenses.mit; + }; + }; - matklad.rust-analyzer = callPackage ./rust-analyzer {}; + ms-python.vscode-pylance = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-pylance"; + publisher = "MS-python"; + version = "2020.11.2"; + sha256 = "0n2dm21vgzir3hx1m3pmx7jq4zy3hdxfsandd2wv5da4fs9b5g50"; + }; - scala-lang.scala = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "scala"; - publisher = "scala-lang"; - version = "0.3.8"; - sha256 = "17dl10m3ayf57sqgil4mr9fjdm7i8gb5clrs227b768pp2d39ll9"; - }; - meta = { - license = stdenv.lib.licenses.mit; - }; - }; + buildInputs = [ nodePackages.pyright ]; - scalameta.metals = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "metals"; - publisher = "scalameta"; - version = "1.9.0"; - sha256 = "0p2wbnw98zmjbfiz4mi1mh131s78r01kjnja339lwdigqxg88gi6"; - }; - meta = { - license = stdenv.lib.licenses.asl20; - }; - }; + meta = { + license = lib.licenses.unfree; + }; + }; - skyapps.fish-vscode = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "fish-vscode"; - publisher = "skyapps"; - version = "0.2.1"; - sha256 = "0y1ivymn81ranmir25zk83kdjpjwcqpnc9r3jwfykjd9x0jib2hl"; - }; - meta = with stdenv.lib; { - license = licenses.mit; - }; - }; + b4dm4n.vscode-nixpkgs-fmt = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "nixpkgs-fmt"; + publisher = "B4dM4n"; + version = "0.0.1"; + sha256 = "sha256-vz2kU36B1xkLci2QwLpl/SBEhfSWltIDJ1r7SorHcr8="; + }; + nativeBuildInputs = [ jq moreutils ]; + postInstall = '' + cd "$out/$installPrefix" + jq '.contributes.configuration.properties."nixpkgs-fmt.path".default = "${nixpkgs-fmt}/bin/nixpkgs-fmt"' package.json | sponge package.json + ''; + meta = with lib; { + license = licenses.mit; + }; + }; - vscodevim.vim = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "vim"; - publisher = "vscodevim"; - version = "1.11.3"; - sha256 = "1smzsgcrkhghbnpy51gp28kh74l7y4s2m8pfxabb4ffb751254j0"; - }; - meta = { - license = stdenv.lib.licenses.mit; - }; - }; + baccata.scaladex-search = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "scaladex-search"; + publisher = "baccata"; + version = "0.0.1"; + sha256 = "1y8p4rr8qq5ng52g4pbx8ayq04gi2869wrx68k69rl7ga7bzcyp9"; + }; + meta = { + license = lib.licenses.asl20; + }; + }; - xaver.clang-format = buildVscodeMarketplaceExtension { - mktplcRef = { - name = "clang-format"; - publisher = "xaver"; - version = "1.9.0"; - sha256 = "abd0ef9176eff864f278c548c944032b8f4d8ec97d9ac6e7383d60c92e258c2f"; - }; - meta = with stdenv.lib; { - license = licenses.mit; - maintainers = [ maintainers.zeratax ]; + bbenoist.Nix = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "Nix"; + publisher = "bbenoist"; + version = "1.0.1"; + sha256 = "0zd0n9f5z1f0ckzfjr38xw2zzmcxg1gjrava7yahg5cvdcw6l35b"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + betterthantomorrow.calva = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "calva"; + publisher = "betterthantomorrow"; + version = "2.0.205"; + sha256 = "sha256-umnG1uLB42fUNKjANaKcABjVmqbdOQakd/6TPsEpF9c"; + }; + nativeBuildInputs = [ jq moreutils ]; + postInstall = '' + cd "$out/$installPrefix" + jq '.contributes.configuration[0].properties."calva.clojureLspPath".default = "${clojure-lsp}/bin/clojure-lsp"' package.json | sponge package.json + ''; + meta = with lib; { + license = licenses.mit; + }; + }; + + bodil.file-browser = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "file-browser"; + publisher = "bodil"; + version = "0.2.10"; + sha256 = "sha256-RW4vm0Hum9AeN4Rq7MSJOIHnALU0L1tBLKjaRLA2hL8="; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + bradlc.vscode-tailwindcss = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-tailwindcss"; + publisher = "bradlc"; + version = "0.6.13"; + sha256 = "098vrm28b7jpzk0c2d0cgxvdw4jsswzf18cx1m9jwsm1j40fp5f4"; + }; + meta = with lib; { + license = licenses.mpl20; + }; + }; + + brettm12345.nixfmt-vscode = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "nixfmt-vscode"; + publisher = "brettm12345"; + version = "0.0.1"; + sha256 = "07w35c69vk1l6vipnq3qfack36qcszqxn8j3v332bl0w6m02aa7k"; + }; + meta = with lib; { + license = licenses.mpl20; + }; + }; + + cmschuetz12.wal = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "wal"; + publisher = "cmschuetz12"; + version = "0.1.0"; + sha256 = "0q089jnzqzhjfnv0vlb5kf747s3mgz64r7q3zscl66zb2pz5q4zd"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + codezombiech.gitignore = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "gitignore"; + publisher = "codezombiech"; + version = "0.6.0"; + sha256 = "0gnc0691pwkd9s8ldqabmpfvj0236rw7bxvkf0bvmww32kv1ia0b"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + CoenraadS.bracket-pair-colorizer = buildVscodeMarketplaceExtension { + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/CoenraadS.bracket-pair-colorizer/changelog"; + description = "A customizable extension for colorizing matching brackets"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer"; + homepage = "https://github.com/CoenraadS/BracketPair"; + license = licenses.mit; + maintainers = with maintainers; [ superherointj ]; + }; + mktplcRef = { + name = "bracket-pair-colorizer"; + publisher = "CoenraadS"; + version = "1.0.61"; + sha256 = "0r3bfp8kvhf9zpbiil7acx7zain26grk133f0r0syxqgml12i652"; + }; + }; + + coenraads.bracket-pair-colorizer-2 = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "bracket-pair-colorizer-2"; + publisher = "CoenraadS"; + version = "0.2.1"; + sha256 = "0bfvzs4ac537zqhnqaa38jf4lhiy1fmqcv6lq89nnx8k963380z7"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + coolbear.systemd-unit-file = buildVscodeMarketplaceExtension { + mktplcRef = { + publisher = "coolbear"; + name = "systemd-unit-file"; + version = "1.0.6"; + sha256 = "0sc0zsdnxi4wfdlmaqwb6k2qc21dgwx6ipvri36x7agk7m8m4736"; + }; + meta = { + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ kamadorueda ]; + }; + }; + + dbaeumer.vscode-eslint = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-eslint"; + publisher = "dbaeumer"; + version = "2.1.14"; + sha256 = "sha256-bVGmp871yu1Llr3uJ+CCosDsrxJtD4b1+CR+omMUfIQ="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + davidanson.vscode-markdownlint = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-markdownlint"; + publisher = "DavidAnson"; + version = "0.42.1"; + sha256 = "c8c0647e0dd786fe68becca6dc73eade5f4220a26ab9faff8dd813a14b25df51"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + dhall.dhall-lang = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "dhall-lang"; + publisher = "dhall"; + version = "0.0.4"; + sha256 = "0sa04srhqmngmw71slnrapi2xay0arj42j4gkan8i11n7bfi1xpf"; + }; + meta = { license = lib.licenses.mit; }; + }; + + dhall.vscode-dhall-lsp-server = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-dhall-lsp-server"; + publisher = "dhall"; + version = "0.0.4"; + sha256 = "1zin7s827bpf9yvzpxpr5n6mv0b5rhh3civsqzmj52mdq365d2js"; + }; + meta = { license = lib.licenses.mit; }; + }; + + divyanshuagrawal.competitive-programming-helper = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "competitive-programming-helper"; + publisher = "DivyanshuAgrawal"; + version = "5.8.5"; + sha256 = "25v2tdAX7fVl2B5nvOIKN9vP1G5rA0G67CiDQn9n9Uc="; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/DivyanshuAgrawal.competitive-programming-helper/changelog"; + description = "Makes judging, compiling, and downloading problems for competitve programming easy. Also supports auto-submit for a few sites."; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=DivyanshuAgrawal.competitive-programming-helper"; + homepage = "https://github.com/agrawal-d/cph"; + license = licenses.gpl3; + maintainers = with maintainers; [ arcticlimer ]; + }; + }; + + donjayamanne.githistory = buildVscodeMarketplaceExtension { + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/donjayamanne.githistory/changelog"; + description = "View git log, file history, compare branches or commits"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory"; + homepage = "https://github.com/DonJayamanne/gitHistoryVSCode/"; + license = licenses.mit; + maintainers = with maintainers; [ superherointj ]; + }; + mktplcRef = { + name = "githistory"; + publisher = "donjayamanne"; + version = "0.6.14"; + sha256 = "11x116hzqnhgbryp2kqpki1z5mlnwxb0ly9r1513m5vgbisrsn0i"; + }; + }; + + dotjoshjohnson.xml = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "xml"; + publisher = "dotjoshjohnson"; + version = "2.5.1"; + sha256 = "1v4x6yhzny1f8f4jzm4g7vqmqg5bqchyx4n25mkgvw2xp6yls037"; + }; + meta = { + description = "XML Tools"; + homepage = "https://github.com/DotJoshJohnson/vscode-xml"; + license = lib.licenses.mit; + }; + }; + + dracula-theme.theme-dracula = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "theme-dracula"; + publisher = "dracula-theme"; + version = "2.22.3"; + sha256 = "0wni9sriin54ci8rly2s68lkfx8rj1cys6mgcizvps9sam6377w6"; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/dracula-theme.theme-dracula/changelog"; + description = "Dark theme for many editors, shells, and more"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=dracula-theme.theme-dracula"; + homepage = "https://draculatheme.com/"; + license = licenses.mit; + }; + }; + + eamodio.gitlens = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "gitlens"; + publisher = "eamodio"; + version = "11.6.0"; + sha256 = "sha256-JxCNE/IL/v94xWmhebsRZo1Gw+nSSpDgZ41ZGongGVI="; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/eamodio.gitlens/changelog"; + description = "GitLens supercharges the Git capabilities built into Visual Studio Code."; + longDescription = '' + Supercharge the Git capabilities built into Visual Studio Code — Visualize code authorship at a glance via Git + blame annotations and code lens, seamlessly navigate and explore Git repositories, gain valuable insights via + powerful comparison commands, and so much more + ''; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens"; + homepage = "https://gitlens.amod.io/"; + license = licenses.mit; + maintainers = with maintainers; [ ratsclub ]; + }; + }; + + editorconfig.editorconfig = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "EditorConfig"; + publisher = "EditorConfig"; + version = "0.16.4"; + sha256 = "0fa4h9hk1xq6j3zfxvf483sbb4bd17fjl5cdm3rll7z9kaigdqwg"; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/EditorConfig.EditorConfig/changelog"; + description = "EditorConfig Support for Visual Studio Code"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig"; + homepage = "https://github.com/editorconfig/editorconfig-vscode"; + license = licenses.mit; + maintainers = with maintainers; [ dbirks ]; + }; + }; + + edonet.vscode-command-runner = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-command-runner"; + publisher = "edonet"; + version = "0.0.116"; + sha256 = "0fxvplyk080m0cdsvzynp6wjillrd4flr5qz7af7fibb2jbmfdkn"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + elmtooling.elm-ls-vscode = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "elm-ls-vscode"; + publisher = "Elmtooling"; + version = "2.0.1"; + sha256 = "06x5ld2r1hzns2s052mvhmfiaawjzcn0jf5lkfprhmrkxnmfdd43"; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/Elmtooling.elm-ls-vscode/changelog"; + description = "Elm language server"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=Elmtooling.elm-ls-vscode"; + homepage = "https://github.com/elm-tooling/elm-language-client-vscode"; + license = licenses.mit; + maintainers = with maintainers; [ mcwitt ]; + }; + }; + + emmanuelbeziat.vscode-great-icons = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-great-icons"; + publisher = "emmanuelbeziat"; + version = "2.1.79"; + sha256 = "1cr1pxgxlfr643sfxbcr2xd53s1dnzcpacjj0ffkgizfda2psy78"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + esbenp.prettier-vscode = buildVscodeMarketplaceExtension { + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/esbenp.prettier-vscode/changelog"; + description = "Code formatter using prettier"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode"; + homepage = "https://github.com/prettier/prettier-vscode"; + license = licenses.mit; + maintainers = with maintainers; [ superherointj ]; + }; + mktplcRef = { + name = "prettier-vscode"; + publisher = "esbenp"; + version = "8.0.1"; + sha256 = "017lqpmzjxq5f1zr49akcm9gfki0qq8v7pj7gks6a3szjdx16mnl"; + }; + }; + + eugleo.magic-racket = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "magic-racket"; + publisher = "evzen-wybitul"; + version = "0.5.7"; + sha256 = "sha256-34/H0WgM73yzuOGU2w6Ipq7KuEBuN1bykcLGuvzY3mU="; + }; + nativeBuildInputs = [ jq moreutils ]; + postInstall = '' + cd "$out/$installPrefix" + jq '.contributes.configuration.properties."magic-racket.general.racketPath".default = "${racket-minimal}/bin/racket"' package.json | sponge package.json + ''; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/evzen-wybitul.magic-racket/changelog"; + description = "The best coding experience for Racket in VS Code "; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=evzen-wybitul.magic-racket"; + homepage = "https://github.com/Eugleo/magic-racket"; + license = licenses.agpl3Only; + }; + }; + + file-icons.file-icons = buildVscodeMarketplaceExtension { + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/file-icons.file-icons/changelog"; + description = "File-specific icons in VSCode for improved visual grepping."; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=file-icons.file-icons"; + homepage = "https://github.com/file-icons/vscode"; + license = licenses.mit; + maintainers = with maintainers; [ superherointj ]; + }; + mktplcRef = { + name = "file-icons"; + publisher = "file-icons"; + version = "1.0.28"; + sha256 = "1lyx0l42xhi2f3rdnjddc3mw7m913kjnchawi98i6vqsx3dv7091"; + }; + }; + + foam.foam-vscode = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "foam-vscode"; + publisher = "foam"; + version = "0.14.1"; + sha256 = "sha256-w9xGkezS3A9z6sTk8WWgW7g8qYX6mJFfRV0lv5cu160="; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/foam.foam-vscode/changelog"; + description = "A personal knowledge management and sharing system for VSCode "; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=foam.foam-vscode"; + homepage = "https://foambubble.github.io/"; + license = licenses.mit; + maintainers = with maintainers; [ ratsclub ]; + }; + }; + + formulahendry.auto-close-tag = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "auto-close-tag"; + publisher = "formulahendry"; + version = "0.5.6"; + sha256 = "058jgmllqb0j6gg5anghdp35nkykii28igfcwqgh4bp10pyvspg0"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + formulahendry.auto-rename-tag = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "auto-rename-tag"; + publisher = "formulahendry"; + version = "0.1.6"; + sha256 = "0cqg9mxkyf41brjq2c764w42lzyn6ffphw6ciw7xnqk1h1x8wwbs"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + formulahendry.code-runner = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "code-runner"; + publisher = "formulahendry"; + version = "0.11.2"; + sha256 = "0qwcxr6m1xwhqmdl4pccjgpikpq1hgi2hgrva5abn8ixa2510hcy"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + foxundermoon.shell-format = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "shell-format"; + publisher = "foxundermoon"; + version = "7.1.0"; + sha256 = "09z72mdr5bfdcb67xyzlv7lb9vyjlc3k9ackj4jgixfk40c68cnj"; + }; + meta = with lib; { + downloadPage = "https://marketplace.visualstudio.com/items?itemName=foxundermoon.shell-format"; + homepage = "https://github.com/foxundermoon/vs-shell-format"; + license = licenses.mit; + maintainers = with maintainers; [ dbirks ]; + }; + }; + + freebroccolo.reasonml = buildVscodeMarketplaceExtension { + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/freebroccolo.reasonml/changelog"; + description = "Reason support for Visual Studio Code"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=freebroccolo.reasonml"; + homepage = "https://github.com/reasonml-editor/vscode-reasonml"; + license = licenses.asl20; + maintainers = with maintainers; [ superherointj ]; + }; + mktplcRef = { + name = "reasonml"; + publisher = "freebroccolo"; + version = "1.0.38"; + sha256 = "1nay6qs9vcxd85ra4bv93gg3aqg3r2wmcnqmcsy9n8pg1ds1vngd"; + }; + }; + + jkillian.custom-local-formatters = buildVscodeMarketplaceExtension { + mktplcRef = { + publisher = "jkillian"; + name = "custom-local-formatters"; + version = "0.0.4"; + sha256 = "1pmqnc759fq86g2z3scx5xqpni9khcqi5z2kpl1kb7yygsv314gm"; + }; + meta = { + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ kamadorueda ]; + }; + }; + + github = { + github-vscode-theme = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "github-vscode-theme"; + publisher = "github"; + version = "4.1.1"; + sha256 = "14wz2b0bn1rnmpj28c0mivz2gacla2dgg8ncv7qfx9bsxhf95g68"; + }; + meta = with lib; { + description = "GitHub theme for VS Code"; + downloadPage = + "https://marketplace.visualstudio.com/items?itemName=GitHub.github-vscode-theme"; + homepage = "https://github.com/primer/github-vscode-theme"; + license = licenses.mit; + maintainers = with maintainers; [ hugolgst ]; + }; + }; + + vscode-pull-request-github = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-pull-request-github"; + publisher = "github"; + version = "0.22.0"; + sha256 = "13p3z86vkra26npp5a78pxdwa4z6jqjzsd38arhgdnjgwmi6bnrw"; + }; + meta = { license = lib.licenses.mit; }; + }; + }; + + golang.Go = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "Go"; + publisher = "golang"; + version = "0.25.1"; + sha256 = "sha256-ZDUWN9lzDnR77W7xcMFQaaFl/6Lf/x1jgaBkwZPqGGw="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + graphql.vscode-graphql = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-graphql"; + publisher = "GraphQL"; + version = "0.3.13"; + sha256 = "sha256-JjEefVHQUYidUsr8Ce/dh7hLDm21WkyS+2RwsXHoY04="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + gruntfuggly.todo-tree = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "todo-tree"; + publisher = "Gruntfuggly"; + version = "0.0.213"; + sha256 = "0fj7vvaqdldhbzm9dqh2plqlhg34jv5khd690xd87h418sv8rk95"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + haskell.haskell = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "haskell"; + publisher = "haskell"; + version = "1.1.0"; + sha256 = "1wg06lyk0qn9jd6gi007sg7v0z9z8gwq7x2449d4ihs9n3w5l0gb"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + hashicorp.terraform = callPackage ./terraform { }; + + hookyqr.beautify = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "beautify"; + publisher = "HookyQR"; + version = "1.5.0"; + sha256 = "1c0kfavdwgwham92xrh0gnyxkrl9qlkpv39l1yhrldn8vd10fj5i"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + ibm.output-colorizer = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "output-colorizer"; + publisher = "IBM"; + version = "0.1.2"; + sha256 = "0i9kpnlk3naycc7k8gmcxas3s06d67wxr3nnyv5hxmsnsx5sfvb7"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + iciclesoft.workspacesort = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "workspacesort"; + publisher = "iciclesoft"; + version = "1.6.0"; + sha256 = "1pbk8kflywll6lqhmffz9yjf01dn8xq8sk6rglnfn2kl2ildfhh6"; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/iciclesoft.workspacesort/changelog"; + description = "Sort workspace-folders alphabetically rather than in chronological order"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=iciclesoft.workspacesort"; + homepage = "https://github.com/iciclesoft/workspacesort-for-VSCode"; + license = licenses.mit; + maintainers = with maintainers; [ dbirks ]; + }; + }; + + ionide.ionide-fsharp = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "Ionide-fsharp"; + publisher = "Ionide"; + version = "5.5.5"; + sha256 = "xrBNiIbZVJ0sGUk/4PudD8kSyX94QkrFtf7Ho/sB0Vs="; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/Ionide.Ionide-fsharp/changelog"; + description = "Enhanced F# Language Features for Visual Studio Code"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=Ionide.Ionide-fsharp"; + homepage = "https://ionide.io"; + license = licenses.mit; + maintainers = with maintainers; [ ratsclub ]; + }; + }; + + jakebecker.elixir-ls = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "elixir-ls"; + publisher = "JakeBecker"; + version = "0.7.0"; + sha256 = "sha256-kFrkElD7qC1SpOx1rpcHW1D2hybHCf7cqvIO7JfPuMc="; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + james-yu.latex-workshop = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "latex-workshop"; + publisher = "James-Yu"; + version = "8.2.0"; + sha256 = "1ai16aam4v5jzhxgms589q0l24kyk1a9in6z4i7g05b3sahyxab2"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + jnoortheen.nix-ide = buildVscodeMarketplaceExtension { + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/jnoortheen.nix-ide/changelog"; + description = "Nix language support with formatting and error report"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=jnoortheen.nix-ide"; + homepage = "https://github.com/jnoortheen/vscode-nix-ide"; + license = licenses.mit; + maintainers = with maintainers; [ superherointj ]; + }; + mktplcRef = { + name = "nix-ide"; + publisher = "jnoortheen"; + version = "0.1.7"; + sha256 = "1bw4wyq9abimxbhl7q9g8grvj2ax9qqq6mmqbiqlbsi2arvk0wrm"; + }; + }; + + jock.svg = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "svg"; + publisher = "jock"; + version = "1.4.7"; + sha256 = "04ghqg4s7g7yylmvbxzwzpnyy4zin2bwlgvflh18m77w4j0ckpiq"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + johnpapa.vscode-peacock = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-peacock"; + publisher = "johnpapa"; + version = "3.9.1"; + sha256 = "1g7apzzgfm8s9sjavhwr8jpf9slhq8b9jfkww3q5n41mzzx8m94p"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + jpoissonnier.vscode-styled-components = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-styled-components"; + publisher = "jpoissonnier"; + version = "1.4.1"; + sha256 = "sha256-ojbeuYBCS+DjF5R0aLuBImzoSOb8mXw1s0Uh0CzggzE="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + justusadam.language-haskell = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "language-haskell"; + publisher = "justusadam"; + version = "3.2.1"; + sha256 = "0lxp8xz17ciy93nj4lzxqvz71vw1zdyamrnh2n792yair8890rr6"; + }; + meta = { + license = lib.licenses.bsd3; + }; + }; + + kahole.magit = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "magit"; + publisher = "kahole"; + version = "0.6.18"; + sha256 = "0sqzz5bbqqg60aypvwxcqnxrr72gmwfj9sv0amgkyaf60zg5sf7w"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + mads-hartmann.bash-ide-vscode = buildVscodeMarketplaceExtension { + mktplcRef = { + publisher = "mads-hartmann"; + name = "bash-ide-vscode"; + version = "1.11.0"; + sha256 = "1hq41fy2v1grjrw77mbs9k6ps6gncwlydm03ipawjnsinxc9rdkp"; + }; + meta = { + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ kamadorueda ]; + }; + }; + + mikestead.dotenv = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "dotenv"; + publisher = "mikestead"; + version = "1.0.1"; + sha256 = "sha256-dieCzNOIcZiTGu4Mv5zYlG7jLhaEsJR05qbzzzQ7RWc="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + mishkinf.goto-next-previous-member = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "goto-next-previous-member"; + publisher = "mishkinf"; + version = "0.0.5"; + sha256 = "0kgzap1k924i95al0a63hxcsv8skhaapgfpi9d7vvaxm0fc10l1i"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + mskelton.one-dark-theme = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "one-dark-theme"; + publisher = "mskelton"; + version = "1.7.2"; + sha256 = "1ks6z8wsxmlfhiwa51f7d6digvw11dlxc7mja3hankgxcf5dyj31"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + mechatroner.rainbow-csv = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "rainbow-csv"; + publisher = "mechatroner"; + version = "1.7.1"; + sha256 = "0w5mijs4ll5qjkpyw7qpn1k40pq8spm0b3q72x150ydbcini5hxw"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + ms-azuretools.vscode-docker = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-docker"; + publisher = "ms-azuretools"; + version = "1.9.1"; + sha256 = "1l7pm3s5kbf2vark164ykz4qbpa1ac9ls691hham36f6v91dmff9"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + ms-dotnettools.csharp = callPackage ./ms-dotnettools-csharp { }; + + ms-kubernetes-tools.vscode-kubernetes-tools = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-kubernetes-tools"; + publisher = "ms-kubernetes-tools"; + version = "1.0.6"; + sha256 = "12a4phl1pddsajy3n0ld6rp607iy0pif6pqrs6ljbg2x97fyra28"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + ms-vscode.cpptools = callPackage ./cpptools { }; + + ms-vscode-remote.remote-ssh = callPackage ./remote-ssh { }; + + ms-python.python = callPackage ./python { + extractNuGet = callPackage ./python/extract-nuget.nix { }; + }; + + msjsdiag.debugger-for-chrome = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "debugger-for-chrome"; + publisher = "msjsdiag"; + version = "4.12.11"; + sha256 = "sha256-9i3TgCFThnFF5ccwzS4ATj5c2Xoe/4tDFGv75jJxeQ4="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + ms-toolsai.jupyter = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "jupyter"; + publisher = "ms-toolsai"; + version = "2021.5.745244803"; + sha256 = "0gjpsp61l8daqa87mpmxcrvsvb0pc2vwg7xbkvwn0f13c1739w9p"; + }; + meta = { + license = lib.licenses.unfree; + }; + }; + + naumovs.color-highlight = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "color-highlight"; + publisher = "naumovs"; + version = "2.3.0"; + sha256 = "1syzf43ws343z911fnhrlbzbx70gdn930q67yqkf6g0mj8lf2za2"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + octref.vetur = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vetur"; + publisher = "octref"; + version = "0.34.1"; + sha256 = "09w3bik1mxs7qac67wgrc58vl98ham3syrn2anycpwd7135wlpby"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + redhat.java = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "java"; + publisher = "redhat"; + version = "0.76.0"; + sha256 = "0xb9brki4s00piv4kqgz6idm16nk6x1j6502jljz7y9pif38z32y"; + }; + buildInputs = [ jdk ]; + meta = { + license = lib.licenses.epl20; + broken = lib.versionOlder jdk.version "11"; + }; + }; + + redhat.vscode-yaml = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-yaml"; + publisher = "redhat"; + version = "0.13.0"; + sha256 = "046kdk73a5xbrwq16ff0l64271c6q6ygjvxaph58z29gyiszfkig"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + rubymaniac.vscode-paste-and-indent = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-paste-and-indent"; + publisher = "Rubymaniac"; + version = "0.0.8"; + sha256 = "0fqwcvwq37ndms6vky8jjv0zliy6fpfkh8d9raq8hkinfxq6klgl"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + matklad.rust-analyzer = callPackage ./rust-analyzer { }; + + ocamllabs.ocaml-platform = buildVscodeMarketplaceExtension { + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/ocamllabs.ocaml-platform/changelog"; + description = "Official OCaml Support from OCamlLabs"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=ocamllabs.ocaml-platform"; + homepage = "https://github.com/ocamllabs/vscode-ocaml-platform"; + license = licenses.isc; + maintainers = with maintainers; [ superherointj ]; + }; + mktplcRef = { + name = "ocaml-platform"; + publisher = "ocamllabs"; + version = "1.5.1"; + sha256 = "0jkxpcrbr8xmwfl8jphmarjz2jk54hvmc24ww89d4bgx1awayqfh"; + }; + }; + + pkief.material-icon-theme = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "material-icon-theme"; + publisher = "pkief"; + version = "4.4.0"; + sha256 = "1m9mis59j9xnf1zvh67p5rhayaa9qxjiw9iw847nyl9vsy73w8ya"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + rubbersheep.gi = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "gi"; + publisher = "rubbersheep"; + version = "0.2.11"; + sha256 = "0j9k6wm959sziky7fh55awspzidxrrxsdbpz1d79s5lr5r19rs6j"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + ryu1kn.partial-diff = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "partial-diff"; + publisher = "ryu1kn"; + version = "1.4.1"; + sha256 = "1r4kg4slgxncdppr4fn7i5vfhvzcg26ljia2r97n6wvwn8534vs9"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + scala-lang.scala = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "scala"; + publisher = "scala-lang"; + version = "0.5.3"; + sha256 = "0isw8jh845hj2fw7my1i19b710v3m5qsjy2faydb529ssdqv463p"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + scalameta.metals = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "metals"; + publisher = "scalameta"; + version = "1.10.4"; + sha256 = "0q6zjpdi98png4vpzz39q85nxmsh3h1nnan58saz5rr83d6jgj89"; + }; + meta = { + license = lib.licenses.asl20; + }; + }; + + serayuzgur.crates = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "crates"; + publisher = "serayuzgur"; + version = "0.5.9"; + sha256 = "0l26pyvw7n3bszf97yx6qps72acq112akg3q4jq5mvlibng1nwk0"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + shardulm94.trailing-spaces = buildVscodeMarketplaceExtension { + mktplcRef = { + publisher = "shardulm94"; + name = "trailing-spaces"; + version = "0.3.1"; + sha256 = "0h30zmg5rq7cv7kjdr5yzqkkc1bs20d72yz9rjqag32gwf46s8b8"; + }; + meta = { + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ kamadorueda ]; + }; + }; + + shyykoserhiy.vscode-spotify = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-spotify"; + publisher = "shyykoserhiy"; + version = "3.2.1"; + sha256 = "14d68rcnjx4a20r0ps9g2aycv5myyhks5lpfz0syr2rxr4kd1vh6"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + skyapps.fish-vscode = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "fish-vscode"; + publisher = "skyapps"; + version = "0.2.1"; + sha256 = "0y1ivymn81ranmir25zk83kdjpjwcqpnc9r3jwfykjd9x0jib2hl"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + slevesque.vscode-multiclip = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-multiclip"; + publisher = "slevesque"; + version = "0.1.5"; + sha256 = "1cg8dqj7f10fj9i0g6mi3jbyk61rs6rvg9aq28575rr52yfjc9f9"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + spywhere.guides = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "guides"; + publisher = "spywhere"; + version = "0.9.3"; + sha256 = "1kvsj085w1xax6fg0kvsj1cizqh86i0pkzpwi0sbfvmcq21i6ghn"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + stephlin.vscode-tmux-keybinding = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-tmux-keybinding"; + publisher = "stephlin"; + version = "0.0.6"; + sha256 = "0mph2nval1ddmv9hpl51fdvmagzkqsn8ljwqsfha2130bb7la0d9"; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/stephlin.vscode-tmux-keybinding/changelog"; + description = "A simple extension for tmux behavior in vscode terminal."; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=stephlin.vscode-tmux-keybinding"; + homepage = "https://github.com/StephLin/vscode-tmux-keybinding"; + license = licenses.mit; + maintainers = with maintainers; [ dbirks ]; + }; + }; + + streetsidesoftware.code-spell-checker = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "code-spell-checker"; + publisher = "streetsidesoftware"; + version = "1.10.2"; + sha256 = "1ll046rf5dyc7294nbxqk5ya56g2bzqnmxyciqpz2w5x7j75rjib"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + svelte.svelte-vscode = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "svelte-vscode"; + publisher = "svelte"; + version = "105.3.0"; + sha256 = "11plqsj3c4dv0xg2d76pxrcn382qr9wbh1lhln2x8mzv840icvwr"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + svsool.markdown-memo = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "markdown-memo"; + publisher = "svsool"; + version = "0.3.9"; + sha256 = "sha256-BsKFHR3wkSRHS8QOi63vLwGj3T2CPzvqXhgtEOq6gJM="; + }; + meta = with lib; { + changelog = "https://marketplace.visualstudio.com/items/svsool.markdown-memo/changelog"; + description = "Markdown knowledge base with bidirectional [[link]]s built on top of VSCode"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=svsool.markdown-memo"; + homepage = "https://github.com/svsool/vscode-memo"; + license = licenses.mit; + maintainers = with maintainers; [ ratsclub ]; + }; + }; + + tamasfe.even-better-toml = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "even-better-toml"; + publisher = "tamasfe"; + version = "0.9.3"; + sha256 = "16x2y58hkankazpwm93j8lqdn3mala7iayck548kki9zx4qrhhck"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + tiehuis.zig = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "zig"; + publisher = "tiehuis"; + version = "0.2.5"; + sha256 = "sha256-P8Sep0OtdchTfnudxFNvIK+SW++TyibGVI9zd+B5tu4="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + + timonwong.shellcheck = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "shellcheck"; + publisher = "timonwong"; + version = "0.14.4"; + sha256 = "05z314sw9nqym3qlj7dcwm0fz1hb23xppzqn3nr2wcj17hs8zz4m"; + }; + nativeBuildInputs = [ jq moreutils ]; + postInstall = '' + cd "$out/$installPrefix" + jq '.contributes.configuration.properties."shellcheck.executablePath".default = "${shellcheck}/bin/shellcheck"' package.json | sponge package.json + ''; + meta = { + license = lib.licenses.mit; + }; + }; + + tomoki1207.pdf = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "pdf"; + publisher = "tomoki1207"; + version = "1.1.0"; + sha256 = "0pcs4iy77v4f04f8m9w2rpdzfq7sqbspr7f2sm1fv7bm515qgsvb"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + tyriar.sort-lines = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "sort-lines"; + publisher = "Tyriar"; + version = "1.9.0"; + sha256 = "0l4wibsjnlbzbrl1wcj18vnm1q4ygvxmh347jvzziv8f1l790qjl"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + usernamehw.errorlens = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "errorlens"; + publisher = "usernamehw"; + version = "3.2.4"; + sha256 = "0caxmf6v0s5kgp6cp3j1kk7slhspjv5kzhn4sq3miyl5jkrn95kx"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + vadimcn.vscode-lldb = callPackage ./vscode-lldb { }; + + vincaslt.highlight-matching-tag = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "highlight-matching-tag"; + publisher = "vincaslt"; + version = "0.10.0"; + sha256 = "1albwz3lc9i20if77inm1ipwws8apigvx24rbag3d1h3p4vwda49"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + ms-vsliveshare.vsliveshare = callPackage ./ms-vsliveshare-vsliveshare { }; + + vscodevim.vim = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vim"; + publisher = "vscodevim"; + version = "1.21.5"; + sha256 = "1v1xs1wcigisr6xip31i02cfryxrb157sla34y59pwlnhc5x1gny"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + vspacecode.vspacecode = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vspacecode"; + publisher = "VSpaceCode"; + version = "0.10.1"; + sha256 = "sha256-H7SCC/ZhDswMQjLX+qpQa6A1N83MobJRPC4pyIbZ1kA="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + vspacecode.whichkey = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "whichkey"; + publisher = "VSpaceCode"; + version = "0.9.2"; + sha256 = "sha256-f+t2d8iWW88OYzuYFxzQPnmFMgx/DELBywYhA8A/0EU="; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + wix.vscode-import-cost = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-import-cost"; + publisher = "wix"; + version = "2.15.0"; + sha256 = "0d3b6654cdck1syn74vmmd1jmgkrw5v4c4cyrhdxbhggkip732bc"; + }; + meta = with lib; { + license = licenses.mit; + }; + }; + + xaver.clang-format = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "clang-format"; + publisher = "xaver"; + version = "1.9.0"; + sha256 = "abd0ef9176eff864f278c548c944032b8f4d8ec97d9ac6e7383d60c92e258c2f"; + }; + meta = with lib; { + license = licenses.mit; + maintainers = [ maintainers.zeratax ]; + }; + }; + + xyz.local-history = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "local-history"; + publisher = "xyz"; + version = "1.8.1"; + sha256 = "1mfmnbdv76nvwg4xs3rgsqbxk8hw9zr1b61har9c3pbk9r4cay7v"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + yzhang.markdown-all-in-one = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "markdown-all-in-one"; + publisher = "yzhang"; + version = "3.4.0"; + sha256 = "0ihfrsg2sc8d441a2lkc453zbw1jcpadmmkbkaf42x9b9cipd5qb"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + zhuangtongfa.material-theme = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "material-theme"; + publisher = "zhuangtongfa"; + version = "3.9.12"; + sha256 = "017h9hxplf2rhmlhn3vag0wypcx6gxi7p9fgllj5jzwrl2wsjl0g"; + }; + meta = { + license = lib.licenses.mit; + }; + }; + + llvm-org.lldb-vscode = llvmPackages_8.lldb; + + WakaTime.vscode-wakatime = callPackage ./wakatime { }; + + wholroyd.jinja = buildVscodeMarketplaceExtension { + mktplcRef = { + name = "jinja"; + publisher = "wholroyd"; + version = "0.0.8"; + sha256 = "1ln9gly5bb7nvbziilnay4q448h9npdh7sd9xy277122h0qawkci"; + }; + meta = { + license = lib.licenses.mit; + }; + }; }; + + aliases = self: super: { + # aliases + ms-vscode = lib.recursiveUpdate super.ms-vscode { inherit (super.golang) Go; }; }; - llvm-org.lldb-vscode = llvmPackages_8.lldb; + # TODO: add overrides overlay, so that we can have a generated.nix + # then apply extension specific modifcations to packages. - WakaTime.vscode-wakatime = callPackage ./wakatime {}; -} + # overlays will be applied left to right, overrides should come after aliases. + overlays = lib.optionals (config.allowAliases or true) [ aliases ]; + + toFix = lib.foldl' (lib.flip lib.extends) baseExtensions overlays; +in +lib.fix toFix diff --git a/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/default.nix b/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/default.nix new file mode 100644 index 00000000000..6f4bbfb7e92 --- /dev/null +++ b/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/default.nix @@ -0,0 +1,142 @@ +{ lib +, fetchurl +, vscode-utils +, unzip +, patchelf +, makeWrapper +, icu +, stdenv +, openssl +, mono +}: + +let + # Get as close as possible as the `package.json` required version. + # This is what drives omnisharp. + rtDepsSrcsFromJson = builtins.fromJSON (builtins.readFile ./rt-deps-bin-srcs.json); + + rtDepsBinSrcs = builtins.mapAttrs (k: v: + let + # E.g: "OmniSharp-x86_64-linux" + kSplit = builtins.split "(-)" k; + name = builtins.elemAt kSplit 0; + arch = builtins.elemAt kSplit 2; + platform = builtins.elemAt kSplit 4; + in + { + inherit name arch platform; + installPath = v.installPath; + binaries = v.binaries; + bin-src = fetchurl { + urls = v.urls; + inherit (v) sha256; + }; + } + ) + rtDepsSrcsFromJson; + + arch = "x86_64"; + platform = "linux"; + + rtDepBinSrcByName = bSrcName: + rtDepsBinSrcs."${bSrcName}-${arch}-${platform}"; + + omnisharp = rtDepBinSrcByName "OmniSharp"; + vsdbg = rtDepBinSrcByName "Debugger"; + razor = rtDepBinSrcByName "Razor"; +in + +vscode-utils.buildVscodeMarketplaceExtension { + mktplcRef = { + name = "csharp"; + publisher = "ms-dotnettools"; + version = "1.23.2"; + sha256 = "0ydaiy8jfd1bj50bqiaz5wbl7r6qwmbz9b29bydimq0rdjgapaar"; + }; + + nativeBuildInputs = [ + unzip + patchelf + makeWrapper + ]; + + postPatch = '' + declare ext_unique_id + # See below as to why we cannot take the whole basename. + ext_unique_id="$(basename "$out" | head -c 32)" + + # Fix 'Unable to connect to debuggerEventsPipeName .. exceeds the maximum length 107.' when + # attempting to launch a specific test in debug mode. The extension attemps to open + # a pipe in extension dir which would fail anyway. We change to target file path + # to a path in tmp dir with a short name based on the unique part of the nix store path. + # This is however a brittle patch as we're working on minified code. + # Hence the attempt to only hold on stable names. + # However, this really would better be fixed upstream. + sed -i \ + -E -e 's/(this\._pipePath=[a-zA-Z0-9_]+\.join\()([a-zA-Z0-9_]+\.getExtensionPath\(\)[^,]*,)/\1require("os").tmpdir(), "'"$ext_unique_id"'"\+/g' \ + "$PWD/dist/extension.js" + + unzip_to() { + declare src_zip="''${1?}" + declare target_dir="''${2?}" + mkdir -p "$target_dir" + if unzip "$src_zip" -d "$target_dir"; then + true + elif [[ "1" -eq "$?" ]]; then + 1>&2 echo "WARNING: unzip('$?' -> skipped files)." + else + 1>&2 echo "ERROR: unzip('$?')." + fi + } + + patchelf_add_icu_as_needed() { + declare elf="''${1?}" + declare icu_major_v="${ + with builtins; head (splitVersion (parseDrvName icu.name).version)}" + + for icu_lib in icui18n icuuc icudata; do + patchelf --add-needed "lib''${icu_lib}.so.$icu_major_v" "$elf" + done + } + + patchelf_common() { + declare elf="''${1?}" + + patchelf_add_icu_as_needed "$elf" + patchelf --add-needed "libssl.so" "$elf" + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + --set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc openssl.out icu.out ]}:\$ORIGIN" \ + "$elf" + } + + declare omnisharp_dir="$PWD/${omnisharp.installPath}" + unzip_to "${omnisharp.bin-src}" "$omnisharp_dir" + rm "$omnisharp_dir/bin/mono" + ln -s -T "${mono}/bin/mono" "$omnisharp_dir/bin/mono" + chmod a+x "$omnisharp_dir/run" + touch "$omnisharp_dir/install.Lock" + + declare vsdbg_dir="$PWD/${vsdbg.installPath}" + unzip_to "${vsdbg.bin-src}" "$vsdbg_dir" + chmod a+x "$vsdbg_dir/vsdbg-ui" + chmod a+x "$vsdbg_dir/vsdbg" + touch "$vsdbg_dir/install.complete" + touch "$vsdbg_dir/install.Lock" + patchelf_common "$vsdbg_dir/vsdbg" + patchelf_common "$vsdbg_dir/vsdbg-ui" + + declare razor_dir="$PWD/${razor.installPath}" + unzip_to "${razor.bin-src}" "$razor_dir" + chmod a+x "$razor_dir/rzls" + touch "$razor_dir/install.Lock" + patchelf_common "$razor_dir/rzls" + ''; + + meta = with lib; { + description = "C# for Visual Studio Code (powered by OmniSharp)"; + homepage = "https://github.com/OmniSharp/omnisharp-vscode"; + license = licenses.mit; + maintainers = [ maintainers.jraygauthier ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/rt-deps-bin-srcs.json b/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/rt-deps-bin-srcs.json new file mode 100644 index 00000000000..91ee056efc1 --- /dev/null +++ b/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/rt-deps-bin-srcs.json @@ -0,0 +1,37 @@ +{ + "OmniSharp-x86_64-linux": { + "installPath": ".omnisharp/1.37.1", + "binaries": [ + "./mono.linux-x86_64", + "./run" + ], + "urls": [ + "https://download.visualstudio.microsoft.com/download/pr/46933d64-075c-4f9f-b205-da4a839e2e3c/4bba2c3f40106056b53721c164ff86fa/omnisharp-linux-x64-1.37.1.zip", + "https://roslynomnisharp.blob.core.windows.net/releases/1.37.1/omnisharp-linux-x64-1.37.1.zip" + ], + "sha256": "0yzxkbq0fyq2bv0s7qmycxl0w54lla0vykg1a5lpv9j38k062vvz" + }, + "Debugger-x86_64-linux": { + "installPath": ".debugger", + "binaries": [ + "./vsdbg-ui", + "./vsdbg" + ], + "urls": [ + "https://download.visualstudio.microsoft.com/download/pr/292d2e01-fb93-455f-a6b3-76cddad4f1ef/2e9b8bc5431d8f6c56025e76eaabbdff/coreclr-debug-linux-x64.zip", + "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-22-2/coreclr-debug-linux-x64.zip" + ], + "sha256": "1lhyjq6g6lc1b4n4z57g0ssr5msqgsmrl8yli8j9ah5s3jq1lrda" + }, + "Razor-x86_64-linux": { + "installPath": ".razor", + "binaries": [ + "./rzls" + ], + "urls": [ + "https://download.visualstudio.microsoft.com/download/pr/757f5246-2b09-43fe-9a8d-840cfd15092b/2b6d8eee0470acf725c1c7a09f8b6475/razorlanguageserver-linux-x64-6.0.0-alpha.1.20418.9.zip", + "https://razorvscodetest.blob.core.windows.net/languageserver/RazorLanguageServer-linux-x64-6.0.0-alpha.1.20418.9.zip" + ], + "sha256": "1hksxq867anb9h040497phszq64f6krg4a46w0xqrm6crj8znqr5" + } +} diff --git a/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/update-bin-srcs b/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/update-bin-srcs new file mode 100755 index 00000000000..ecd7efba05d --- /dev/null +++ b/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/update-bin-srcs @@ -0,0 +1,25 @@ +#!/usr/bin/env nix-shell +#!nix-shell -I nixpkgs=../../../.. -i bash -p curl jq unzip +set -euf -o pipefail + +declare scriptDir +scriptDir=$(cd "$(dirname "$0")"; pwd) +1>&2 echo "scriptDir='$scriptDir'" + +. "$scriptDir/update-bin-srcs-lib.sh" + +declare extPublisher="ms-dotnettools" +declare extName="csharp" +declare defaultExtVersion="1.23.2" +declare extVersion="${1:-$defaultExtVersion}" + +formatExtRuntimeDeps \ + "$extPublisher" "$extName" "$extVersion" \ + | computeAndAttachExtRtDepsChecksums \ + | jqStreamToJson \ + | tee "$scriptDir/rt-deps-bin-srcs.json" \ + | jq '.' + +# TODO: Unfortunatly no simple json to nix implementation available. +# This would allow us to dump to './rt-deps-bin-srcs.nix' instead. +# jsonToNix diff --git a/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/update-bin-srcs-lib.sh b/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/update-bin-srcs-lib.sh new file mode 100755 index 00000000000..ad494a37908 --- /dev/null +++ b/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/update-bin-srcs-lib.sh @@ -0,0 +1,154 @@ +#!/usr/bin/env bash + +prefetchExtensionZip() { + declare publisher="${1?}" + declare name="${2?}" + declare version="${3?}" + + 1>&2 echo + 1>&2 echo "------------- Downloading extension ---------------" + + declare extZipStoreName="${publisher}-${name}.zip" + declare extUrl="https://${publisher}.gallery.vsassets.io/_apis/public/gallery/publisher/${publisher}/extension/${name}/${version}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage"; + 1>&2 echo "extUrl='$extUrl'" + declare nixPrefetchArgs=( --name "$extZipStoreName" --print-path "$extUrl" ) + + 1>&2 printf "$ nix-prefetch-url" + 1>&2 printf " %q" "${nixPrefetchArgs[@]}" + 1>&2 printf " 2> /dev/null\n" + declare zipShaWStorePath + zipShaWStorePath=$(nix-prefetch-url "${nixPrefetchArgs[@]}" 2> /dev/null) + + 1>&2 echo "zipShaWStorePath='$zipShaWStorePath'" + echo "$zipShaWStorePath" +} + + +prefetchExtensionUnpacked() { + declare publisher="${1?}" + declare name="${2?}" + declare version="${3?}" + + declare zipShaWStorePath + zipShaWStorePath="$(prefetchExtensionZip "$publisher" "$name" "$version")" + + declare zipStorePath + zipStorePath="$(echo "$zipShaWStorePath" | tail -n1)" + 1>&2 echo "zipStorePath='$zipStorePath'" + + function rm_tmpdir() { + 1>&2 printf "rm -rf -- %q\n" "$tmpDir" + rm -rf -- "$tmpDir" + unset tmpDir + trap - INT TERM HUP EXIT + } + function make_trapped_tmpdir() { + tmpDir=$(mktemp -d) + trap rm_tmpdir INT TERM HUP EXIT + } + + 1>&2 echo + 1>&2 echo "------------- Unpacking extension ---------------" + + make_trapped_tmpdir + declare unzipArgs=( -q -d "$tmpDir" "$zipStorePath" ) + 1>&2 printf "$ unzip" + 1>&2 printf " %q" "${unzipArgs[@]}" + 1>&2 printf "\n" + unzip "${unzipArgs[@]}" + + declare unpackedStoreName="${publisher}-${name}" + + declare unpackedStorePath + unpackedStorePath="$(nix add-to-store -n "$unpackedStoreName" "$tmpDir")" + declare unpackedSha256 + unpackedSha256="$(nix hash-path --base32 --type sha256 "$unpackedStorePath")" + 1>&2 echo "unpackedStorePath='$unpackedStorePath'" + 1>&2 echo "unpackedSha256='$unpackedSha256'" + + rm_tmpdir + + echo "$unpackedSha256" + echo "$unpackedStorePath" +} + + +prefetchExtensionJson() { + declare publisher="${1?}" + declare name="${2?}" + declare version="${3?}" + + declare unpackedShaWStorePath + unpackedShaWStorePath="$(prefetchExtensionUnpacked "$publisher" "$name" "$version")" + + declare unpackedStorePath + unpackedStorePath="$(echo "$unpackedShaWStorePath" | tail -n1)" + 1>&2 echo "unpackedStorePath='$unpackedStorePath'" + + declare jsonShaWStorePath + jsonShaWStorePath=$(nix-prefetch-url --print-path "file://${unpackedStorePath}/extension/package.json" 2> /dev/null) + + 1>&2 echo "jsonShaWStorePath='$jsonShaWStorePath'" + echo "$jsonShaWStorePath" +} + + +formatExtRuntimeDeps() { + declare publisher="${1?}" + declare name="${2?}" + declare version="${3?}" + + declare jsonShaWStorePath + jsonShaWStorePath="$(prefetchExtensionJson "$publisher" "$name" "$version")" + + declare jsonStorePath + jsonStorePath="$(echo "$jsonShaWStorePath" | tail -n1)" + 1>&2 echo "jsonStorePath='$jsonStorePath'" + + declare jqQuery + jqQuery=$(cat <<'EOF' +.runtimeDependencies \ +| map(select(.platforms[] | in({"linux": null}))) \ +| map(select(.architectures[] | in({"x86_64": null}))) \ +| .[] | {(.id + "-" + (.architectures[0]) + "-" + (.platforms[0])): \ +{installPath, binaries, urls: [.url, .fallbackUrl]}} +EOF +) + + 1>&2 printf "$ cat %q | jq '%s'\n" "$jsonStorePath" "$jqQuery" + cat "$jsonStorePath" | jq "$jqQuery" +} + + +computeExtRtDepChecksum() { + declare rtDepJsonObject="${1?}" + declare url + url="$(echo "$rtDepJsonObject" | jq -j '.[].urls[0]')" + declare sha256 + 1>&2 printf "$ nix-prefetch-url '%s'\n" "$url" + sha256="$(nix-prefetch-url "$url")" + 1>&2 echo "$sha256" + echo "$sha256" +} + + +computeAndAttachExtRtDepsChecksums() { + while read -r rtDepJsonObject; do + declare sha256 + sha256="$(computeExtRtDepChecksum "$rtDepJsonObject")" + echo "$rtDepJsonObject" | jq --arg sha256 "$sha256" '.[].sha256 = $sha256' + done < <(cat - | jq -c '.') +} + + +jqStreamToJson() { + cat - | jq --slurp '. | add' +} + + +jsonToNix() { + # TODO: Replacing this non functional stuff with a proper json to nix + # implementation would allow us to produce a 'rt-deps-bin-srcs.nix' file instead. + false + cat - | sed -E -e 's/": /" = /g' -e 's/,$/;/g' -e 's/ }$/ };/g' -e 's/ ]$/ ];/g' +} diff --git a/pkgs/misc/vscode-extensions/ms-vsliveshare-vsliveshare/default.nix b/pkgs/misc/vscode-extensions/ms-vsliveshare-vsliveshare/default.nix new file mode 100644 index 00000000000..0fa9a4bb4be --- /dev/null +++ b/pkgs/misc/vscode-extensions/ms-vsliveshare-vsliveshare/default.nix @@ -0,0 +1,134 @@ +# Based on previous attempts: +# - <https://github.com/msteen/nixos-vsliveshare/blob/master/pkgs/vsliveshare/default.nix> +# - <https://github.com/NixOS/nixpkgs/issues/41189> +{ lib, gccStdenv, vscode-utils +, jq, autoPatchelfHook, bash, makeWrapper +, dotnet-sdk_3, curl, gcc, icu, libkrb5, libsecret, libunwind, libX11, lttng-ust, openssl, util-linux, zlib +, desktop-file-utils, xprop, xsel +}: + +with lib; + +let + # https://docs.microsoft.com/en-us/visualstudio/liveshare/reference/linux#install-prerequisites-manually + libs = [ + # .NET Core + openssl + libkrb5 + zlib + icu + + # Credential Storage + libsecret + + # NodeJS + libX11 + + # https://github.com/flathub/com.visualstudio.code.oss/issues/11#issuecomment-392709170 + libunwind + lttng-ust + curl + + # General + gcc.cc.lib + util-linux # libuuid + ]; + +in ((vscode-utils.override { stdenv = gccStdenv; }).buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vsliveshare"; + publisher = "ms-vsliveshare"; + version = "1.0.4498"; + sha256 = "01gg9jqkq9z05ckw0mnqfr769359j6h3z8ay6r17jj6m4mhy2m5g"; + }; +}).overrideAttrs({ nativeBuildInputs ? [], buildInputs ? [], ... }: { + nativeBuildInputs = nativeBuildInputs ++ [ + bash + jq + autoPatchelfHook + makeWrapper + ]; + buildInputs = buildInputs ++ libs; + + # Using a patch file won't work, because the file changes too often, causing the patch to fail on most updates. + # Rather than patching the calls to functions, we modify the functions to return what we want, + # which is less likely to break in the future. + postPatch = '' + sed -i \ + -e 's/updateExecutablePermissionsAsync() {/& return;/' \ + -e 's/isInstallCorrupt(traceSource, manifest) {/& return false;/' \ + out/prod/extension-prod.js + + declare ext_unique_id + ext_unique_id="$(basename "$out")" + + # Fix extension attempting to write to 'modifiedInternalSettings.json'. + # Move this write to the tmp directory indexed by the nix store basename. + substituteInPlace out/prod/extension-prod.js \ + --replace "path.resolve(constants_1.EXTENSION_ROOT_PATH, './modifiedInternalSettings.json')" \ + "path.join(os.tmpdir(), '$ext_unique_id-modifiedInternalSettings.json')" + + # Fix extension attempting to write to 'vsls-agent.lock'. + # Move this write to the tmp directory indexed by the nix store basename. + substituteInPlace out/prod/extension-prod.js \ + --replace "path + '.lock'" \ + "__webpack_require__('path').join(__webpack_require__('os').tmpdir(), '$ext_unique_id-vsls-agent.lock')" + + # Hardcode executable paths + echo '#!/bin/sh' >node_modules/@vsliveshare/vscode-launcher-linux/check-reqs.sh + substituteInPlace node_modules/@vsliveshare/vscode-launcher-linux/install.sh \ + --replace desktop-file-install ${desktop-file-utils}/bin/desktop-file-install + substituteInPlace node_modules/@vsliveshare/vscode-launcher-linux/uninstall.sh \ + --replace update-desktop-database ${desktop-file-utils}/bin/update-desktop-database + substituteInPlace node_modules/@vsliveshare/vscode-launcher-linux/vsls-launcher \ + --replace /bin/bash ${bash}/bin/bash + substituteInPlace out/prod/extension-prod.js \ + --replace xprop ${xprop}/bin/xprop \ + --replace "'xsel'" "'${xsel}/bin/xsel'" + ''; + + postInstall = '' + cd $out/share/vscode/extensions/ms-vsliveshare.vsliveshare + + bash -s <<ENDSUBSHELL + shopt -s extglob + + # A workaround to prevent the journal filling up due to diagnostic logging. + # See: https://github.com/MicrosoftDocs/live-share/issues/1272 + # See: https://unix.stackexchange.com/questions/481799/how-to-prevent-a-process-from-writing-to-the-systemd-journal + gcc -fPIC -shared -ldl -o dotnet_modules/noop-syslog.so ${./noop-syslog.c} + + # Normally the copying of the right executables is done externally at a later time, + # but we want it done at installation time. + cp dotnet_modules/exes/linux-x64/* dotnet_modules + + # The required executables are already copied over, + # and the other runtimes won't be used and thus are just a waste of space. + rm -r dotnet_modules/exes dotnet_modules/runtimes/!(linux-x64|unix) + + # Not all executables and libraries are executable, so make sure that they are. + jq <package.json '.executables.linux[]' -r | xargs chmod +x + + # Lock the extension downloader. + touch install-linux.Lock externalDeps-linux.Lock + ENDSUBSHELL + ''; + + postFixup = '' + # We cannot use `wrapProgram`, because it will generate a relative path, + # which will break when copying over the files. + mv dotnet_modules/vsls-agent{,-wrapped} + makeWrapper $PWD/dotnet_modules/vsls-agent{-wrapped,} \ + --prefix LD_LIBRARY_PATH : "${makeLibraryPath libs}" \ + --set LD_PRELOAD $PWD/dotnet_modules/noop-syslog.so \ + --set DOTNET_ROOT ${dotnet-sdk_3} + ''; + + meta = { + description = "Live Share lets you achieve greater confidence at speed by streamlining collaborative editing, debugging, and more in real-time during development"; + homepage = "https://aka.ms/vsls-docs"; + license = licenses.unfree; + maintainers = with maintainers; [ jraygauthier V ]; + platforms = [ "x86_64-linux" ]; + }; +}) diff --git a/pkgs/misc/vscode-extensions/ms-vsliveshare-vsliveshare/noop-syslog.c b/pkgs/misc/vscode-extensions/ms-vsliveshare-vsliveshare/noop-syslog.c new file mode 100644 index 00000000000..c76ec57a382 --- /dev/null +++ b/pkgs/misc/vscode-extensions/ms-vsliveshare-vsliveshare/noop-syslog.c @@ -0,0 +1 @@ +void syslog(int priority, const char *format, ...) { } diff --git a/pkgs/misc/vscode-extensions/python/default.nix b/pkgs/misc/vscode-extensions/python/default.nix index 7dea6794521..89950a51598 100644 --- a/pkgs/misc/vscode-extensions/python/default.nix +++ b/pkgs/misc/vscode-extensions/python/default.nix @@ -41,13 +41,13 @@ in vscode-utils.buildVscodeMarketplaceExtension rec { mktplcRef = { name = "python"; publisher = "ms-python"; - version = "2020.7.96456"; + version = "2021.5.829140558"; }; vsix = fetchurl { name = "${mktplcRef.publisher}-${mktplcRef.name}.zip"; url = "https://github.com/microsoft/vscode-python/releases/download/${mktplcRef.version}/ms-python-release.vsix"; - sha256 = "0bk2wnbjcraxilzxszl00r799xf3apkfyzpy88xxv87j7787dsm8"; + sha256 = "0y2HN4WGYUUXBfqp8Xb4oaA0hbLZmE3kDUXMBAOjvPQ="; }; buildInputs = [ diff --git a/pkgs/misc/vscode-extensions/python/extract-nuget.nix b/pkgs/misc/vscode-extensions/python/extract-nuget.nix index e4d3b6a0ed1..1e70cabe035 100644 --- a/pkgs/misc/vscode-extensions/python/extract-nuget.nix +++ b/pkgs/misc/vscode-extensions/python/extract-nuget.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation { inherit name version src; - buildInputs = [ unzip ]; + nativeBuildInputs = [ unzip ]; dontBuild = true; unpackPhase = "unzip $src"; installPhase = '' diff --git a/pkgs/misc/vscode-extensions/remote-ssh/default.nix b/pkgs/misc/vscode-extensions/remote-ssh/default.nix index e58ea98a606..29ca973a0aa 100644 --- a/pkgs/misc/vscode-extensions/remote-ssh/default.nix +++ b/pkgs/misc/vscode-extensions/remote-ssh/default.nix @@ -1,8 +1,8 @@ -{ stdenv +{ lib , vscode-utils , useLocalExtensions ? false}: # Note that useLocalExtensions requires that vscode-server is not running -# on host. If it is, you'll need to remove ~/.vscode-server, +# on host. If it is, you'll need to remove $HOME/.vscode-server, # and redo the install by running "Connect to host" on client let @@ -11,7 +11,7 @@ let # patch runs on remote machine hence use of which # links to local node if version is 12 patch = '' - f="/home/''$USER/.vscode-server/bin/''$COMMIT_ID/node" + f="$HOME/.vscode-server/bin/$COMMIT_ID/node" localNodePath=''$(which node) if [ -x "''$localNodePath" ]; then localNodeVersion=''$(node -v) @@ -21,12 +21,12 @@ let ln -s ''$localNodePath ''$f fi fi - ${stdenv.lib.optionalString useLocalExtensions '' + ${lib.optionalString useLocalExtensions '' # Use local extensions - if [ -d ~/.vscode/extensions ]; then - if ! test -L "~/.vscode-server/extensions"; then - mkdir -p ~/.vscode-server - ln -s ~/.vscode/extensions ~/.vscode-server/ + if [ -d $HOME/.vscode/extensions ]; then + if ! test -L "$HOME/.vscode-server/extensions"; then + mkdir -p $HOME/.vscode-server + ln -s $HOME/.vscode/extensions $HOME/.vscode-server/ fi fi ''} @@ -45,7 +45,7 @@ in --replace "# install extensions" '${patch}' ''; - meta = with stdenv.lib; { + meta = with lib; { description ="Use any remote machine with a SSH server as your development environment."; license = licenses.unfree; maintainers = with maintainers; [ diff --git a/pkgs/misc/vscode-extensions/rust-analyzer/build-deps/package.json b/pkgs/misc/vscode-extensions/rust-analyzer/build-deps/package.json index ac2da521c22..d54ad42b1f6 100644 --- a/pkgs/misc/vscode-extensions/rust-analyzer/build-deps/package.json +++ b/pkgs/misc/vscode-extensions/rust-analyzer/build-deps/package.json @@ -2,25 +2,26 @@ "name": "rust-analyzer", "version": "0.4.0-dev", "dependencies": { - "node-fetch": "^2.6.0", - "vscode-languageclient": "7.0.0-next.1", - "@rollup/plugin-commonjs": "^13.0.0", - "@rollup/plugin-node-resolve": "^8.1.0", - "@types/glob": "^7.1.2", - "@types/mocha": "^7.0.2", - "@types/node": "~12.7.0", + "https-proxy-agent": "^5.0.0", + "node-fetch": "^2.6.1", + "vscode-languageclient": "^7.1.0-next.5", + "@rollup/plugin-commonjs": "^17.0.0", + "@rollup/plugin-node-resolve": "^11.0.0", + "@types/glob": "^7.1.3", + "@types/mocha": "^8.0.4", + "@types/node": "~12.12.6", "@types/node-fetch": "^2.5.7", - "@types/vscode": "^1.44.1", - "@typescript-eslint/eslint-plugin": "^3.4.0", - "@typescript-eslint/parser": "^3.4.0", - "eslint": "^7.3.1", + "@types/vscode": "^1.53.0", + "@typescript-eslint/eslint-plugin": "^4.9.0", + "@typescript-eslint/parser": "^4.9.0", + "eslint": "^7.15.0", "glob": "^7.1.6", - "mocha": "^8.0.1", - "rollup": "^2.18.1", - "tslib": "^2.0.0", - "typescript": "^3.9.5", + "mocha": "^8.2.1", + "rollup": "^2.34.2", + "tslib": "^2.0.3", + "typescript": "^4.1.2", "typescript-formatter": "^7.2.2", - "vsce": "^1.75.0", - "vscode-test": "^1.4.0" + "vsce": "=1.88.0", + "vscode-test": "^1.5.1" } } diff --git a/pkgs/misc/vscode-extensions/rust-analyzer/default.nix b/pkgs/misc/vscode-extensions/rust-analyzer/default.nix index d19027fa576..0136bf4e5b1 100644 --- a/pkgs/misc/vscode-extensions/rust-analyzer/default.nix +++ b/pkgs/misc/vscode-extensions/rust-analyzer/default.nix @@ -1,5 +1,5 @@ # Update script: pkgs/development/tools/rust/rust-analyzer/update.sh -{ lib, stdenv, vscode-utils, jq, rust-analyzer, nodePackages +{ lib, vscode-utils, jq, rust-analyzer, nodePackages , setDefaultServerPath ? true }: diff --git a/pkgs/misc/vscode-extensions/terraform/default.nix b/pkgs/misc/vscode-extensions/terraform/default.nix new file mode 100644 index 00000000000..e934f03b209 --- /dev/null +++ b/pkgs/misc/vscode-extensions/terraform/default.nix @@ -0,0 +1,25 @@ +{ lib, fetchurl, vscode-utils, terraform-ls }: +vscode-utils.buildVscodeMarketplaceExtension rec { + mktplcRef = { + name = "terraform"; + publisher = "hashicorp"; + version = "2.13.2"; + }; + + vsix = fetchurl { + name = "${mktplcRef.publisher}-${mktplcRef.name}.zip"; + url = "https://github.com/hashicorp/vscode-terraform/releases/download/v${mktplcRef.version}/${mktplcRef.name}-${mktplcRef.version}.vsix"; + sha256 = "0h7c6p2dcwsg7wlp49p2fsq0f164pzkx65929imd1m2df77aykqa"; + }; + + patches = [ ./fix-terraform-ls.patch ]; + + postPatch = '' + substituteInPlace out/clientHandler.js --replace TERRAFORM-LS-PATH ${terraform-ls}/bin/terraform-ls + ''; + + meta = with lib; { + license = licenses.mit; + maintainers = with maintainers; [ rhoriguchi ]; + }; +} diff --git a/pkgs/misc/vscode-extensions/terraform/fix-terraform-ls.patch b/pkgs/misc/vscode-extensions/terraform/fix-terraform-ls.patch new file mode 100644 index 00000000000..9153276d367 --- /dev/null +++ b/pkgs/misc/vscode-extensions/terraform/fix-terraform-ls.patch @@ -0,0 +1,43 @@ +diff --git a/out/clientHandler.js b/out/clientHandler.js +index 7f9716d..a543d60 100644 +--- a/out/clientHandler.js ++++ b/out/clientHandler.js +@@ -33,8 +33,7 @@ class ClientHandler { + this.reporter.sendTelemetryEvent('usePathToBinary'); + } + else { +- const installPath = path.join(context.extensionPath, 'lsp'); +- this.pathToBinary = path.join(installPath, 'terraform-ls'); ++ this.pathToBinary = 'TERRAFORM-LS-PATH'; + } + } + startClients(folders) { +diff --git a/out/extension.js b/out/extension.js +index 7a271fc..726bbf8 100644 +--- a/out/extension.js ++++ b/out/extension.js +@@ -149,24 +149,6 @@ function updateLanguageServer(clientHandler, installPath) { + updateLanguageServer(clientHandler, installPath); + }, 24 * hour); + // skip install if a language server binary path is set +- if (!vscodeUtils_1.config('terraform').get('languageServer.pathToBinary')) { +- const installer = new languageServerInstaller_1.LanguageServerInstaller(installPath, reporter); +- const install = yield installer.needsInstall(); +- if (install) { +- yield clientHandler.stopClients(); +- try { +- yield installer.install(); +- } +- catch (err) { +- console.log(err); // for test failure reporting +- reporter.sendTelemetryException(err); +- throw err; +- } +- finally { +- yield installer.cleanupZips(); +- } +- } +- } + return clientHandler.startClients(vscodeUtils_1.prunedFolderNames()); // on repeat runs with no install, this will be a no-op + }); + } diff --git a/pkgs/misc/vscode-extensions/updateSettings.nix b/pkgs/misc/vscode-extensions/updateSettings.nix index a033229c589..c7fecf08072 100644 --- a/pkgs/misc/vscode-extensions/updateSettings.nix +++ b/pkgs/misc/vscode-extensions/updateSettings.nix @@ -16,7 +16,7 @@ let updateVSCodeSettingsCmd = '' ( - echo 'updateSettings.nix: Updating ${vscodeSettingsFile}...' + echo 'updateSettings.nix: Updating ${vscodeSettingsFile}...' oldSettings=$(cat ${vscodeSettingsFile}) echo $oldSettings' ${builtins.toJSON settings}' | ${jq}/bin/jq -s add > ${vscodeSettingsFile} )''; @@ -25,10 +25,10 @@ let fileName = builtins.baseNameOf vscodeSettingsFile; symlinkFromUserSettingCmd = lib.optionalString symlinkFromUserSetting '' && mkdir -p "${userSettingsFolder}" && ln -sfv "$(pwd)/${vscodeSettingsFile}" "${userSettingsFolder}/" ''; -in +in writeShellScriptBin ''vscodeNixUpdate-${lib.removeSuffix ".json" (fileName)}'' - (lib.optionalString (settings != {}) + (lib.optionalString (settings != {}) (if createIfDoesNotExists then '' [ ! -f "${vscodeSettingsFile}" ] && ${createEmptySettingsCmd} ${updateVSCodeSettingsCmd} ${symlinkFromUserSettingCmd} diff --git a/pkgs/misc/vscode-extensions/update_installed_exts.sh b/pkgs/misc/vscode-extensions/update_installed_exts.sh index fdbc14fb264..8e0af182cec 100755 --- a/pkgs/misc/vscode-extensions/update_installed_exts.sh +++ b/pkgs/misc/vscode-extensions/update_installed_exts.sh @@ -8,7 +8,7 @@ function fail() { exit 1 } -# Helper to clean up after ourself if we're killed by SIGINT +# Helper to clean up after ourselves if we're killed by SIGINT. function clean_up() { TDIR="${TMPDIR:-/tmp}" echo "Script killed, cleaning up tmpdirs: $TDIR/vscode_exts_*" >&2 @@ -18,7 +18,7 @@ function clean_up() { function get_vsixpkg() { N="$1.$2" - # Create a tempdir for the extension download + # Create a tempdir for the extension download. EXTTMP=$(mktemp -d -t vscode_exts_XXXXXXXX) URL="https://$1.gallery.vsassets.io/_apis/public/gallery/publisher/$1/extension/$2/latest/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage" @@ -32,7 +32,7 @@ function get_vsixpkg() { # Clean up. rm -Rf "$EXTTMP" - # I don't like 'rm -Rf' lurking in my scripts but this seems appropriate + # I don't like 'rm -Rf' lurking in my scripts but this seems appropriate. cat <<-EOF { @@ -44,11 +44,11 @@ function get_vsixpkg() { EOF } -# See if can find our code binary somewhere. +# See if we can find our `code` binary somewhere. if [ $# -ne 0 ]; then CODE=$1 else - CODE=$(command -v code) + CODE=$(command -v code || command -v codium) fi if [ -z "$CODE" ]; then diff --git a/pkgs/misc/vscode-extensions/vscode-lldb/build-deps/package.json b/pkgs/misc/vscode-extensions/vscode-lldb/build-deps/package.json new file mode 100644 index 00000000000..86d7b1aa6fa --- /dev/null +++ b/pkgs/misc/vscode-extensions/vscode-lldb/build-deps/package.json @@ -0,0 +1,23 @@ +{ + "name": "vscode-lldb", + "version": "1.6.5", + "dependencies": { + "string-argv": "^0.3.1", + "yaml": "^1.10.0", + "yauzl": "^2.10.0", + "@types/vscode": "^1.31.0", + "@types/node": "^8.10.50", + "@types/mocha": "^7.0.1", + "@types/yauzl": "^2.9.0", + "typescript": "^4.2.4", + "mocha": "^8.4.0", + "source-map-support": "^0.5.12", + "memory-streams": "^0.1.3", + "vscode-debugprotocol": "^1.47.0", + "vscode-debugadapter-testsupport": "^1.47.0", + "vsce": "=1.88.0", + "webpack": "^5.37.1", + "webpack-cli": "^4.7.0", + "ts-loader": "^8.0.0" + } +} diff --git a/pkgs/misc/vscode-extensions/vscode-lldb/cmake-build-extension-only.patch b/pkgs/misc/vscode-extensions/vscode-lldb/cmake-build-extension-only.patch new file mode 100644 index 00000000000..fb55816b942 --- /dev/null +++ b/pkgs/misc/vscode-extensions/vscode-lldb/cmake-build-extension-only.patch @@ -0,0 +1,36 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 37745b5..cad11a0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -16,13 +16,6 @@ endif() + set(VERSION "${VERSION}${VERSION_SUFFIX}") + message("Version ${VERSION}") + +-set(LLDB_PACKAGE $ENV{LLDB_PACKAGE} CACHE PATH "Zip archive containing LLDB files") +-if (LLDB_PACKAGE) +- message("Using LLDB_PACKAGE=${LLDB_PACKAGE}") +-else() +- message(FATAL_ERROR "LLDB_PACKAGE not set." ) +-endif() +- + set(TEST_TIMEOUT 5000 CACHE STRING "Test timeout [ms]") + + # General OS-specific definitions +@@ -87,16 +80,6 @@ configure_file(package.json ${CMAKE_CURRENT_BINARY_DIR}/package.json @ONLY) + configure_file(webpack.config.js ${CMAKE_CURRENT_BINARY_DIR}/webpack.config.js @ONLY) + file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/package-lock.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) + +-# Run 'npm install' +-execute_process( +- COMMAND ${NPM} ci # like install, but actually respects package-lock file. +- WORKING_DIRECTORY ${CMAKE_BINARY_DIR} +- RESULT_VARIABLE Result +-) +-if (NOT ${Result} EQUAL 0) +- message(FATAL_ERROR "npm intall failed: ${Result}") +-endif() +- + # Copy it back, so we can commit the lock file. + file(COPY ${CMAKE_CURRENT_BINARY_DIR}/package-lock.json DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}) + + diff --git a/pkgs/misc/vscode-extensions/vscode-lldb/default.nix b/pkgs/misc/vscode-extensions/vscode-lldb/default.nix new file mode 100644 index 00000000000..0ef98818dbd --- /dev/null +++ b/pkgs/misc/vscode-extensions/vscode-lldb/default.nix @@ -0,0 +1,104 @@ +{ lib, stdenv, fetchFromGitHub, rustPlatform, makeWrapper, callPackage +, nodePackages, cmake, nodejs, unzip, python3 +}: +assert lib.versionAtLeast python3.version "3.5"; +let + publisher = "vadimcn"; + pname = "vscode-lldb"; + version = "1.6.5"; + + vscodeExtUniqueId = "${publisher}.${pname}"; + + src = fetchFromGitHub { + owner = "vadimcn"; + repo = "vscode-lldb"; + rev = "v${version}"; + sha256 = "sha256-ppiEWFKJiUtlF8LSqBb8Xvg26B+wHcIZJhU+ANE4J2k="; + }; + + lldb = callPackage ./lldb.nix {}; + + adapter = rustPlatform.buildRustPackage { + pname = "${pname}-adapter"; + inherit version src; + + # It will pollute the build environment of `buildRustPackage`. + cargoPatches = [ ./reset-cargo-config.patch ]; + + cargoSha256 = "sha256-ksRFlbtrFAbcX/Pc6rgWUHVl859GVUOvNckxM7Q971U="; + + nativeBuildInputs = [ makeWrapper ]; + + buildAndTestSubdir = "adapter"; + + cargoFlags = [ + "--lib" + "--bin=codelldb" + "--features=weak-linkage" + ]; + + # Tests are linked to liblldb but it is not available here. + doCheck = false; + }; + + nodeDeps = nodePackages."vscode-lldb-build-deps-../../misc/vscode-extensions/vscode-lldb/build-deps"; + +in stdenv.mkDerivation { + pname = "vscode-extension-${publisher}-${pname}"; + inherit src version vscodeExtUniqueId; + + installPrefix = "share/vscode/extensions/${vscodeExtUniqueId}"; + + nativeBuildInputs = [ cmake nodejs unzip makeWrapper ]; + + patches = [ ./cmake-build-extension-only.patch ]; + + postConfigure = '' + cp -r ${nodeDeps}/lib/node_modules/vscode-lldb/{node_modules,package-lock.json} . + ''; + + cmakeFlags = [ + # Do not append timestamp to version. + "-DVERSION_SUFFIX=" + ]; + makeFlags = [ "vsix_bootstrap" ]; + + installPhase = '' + ext=$out/$installPrefix + runHook preInstall + + unzip ./codelldb-bootstrap.vsix 'extension/*' -d ./vsix-extracted + + mkdir -p $ext/{adapter,formatters} + mv -t $ext vsix-extracted/extension/* + cp -t $ext/adapter ${adapter}/{bin,lib}/* ../adapter/*.py + wrapProgram $ext/adapter/codelldb \ + --set-default LLDB_DEBUGSERVER_PATH "${lldb.out}/bin/lldb-server" + cp -t $ext/formatters ../formatters/*.py + ln -s ${lldb.lib} $ext/lldb + # Mark that all components are installed. + touch $ext/platform.ok + + runHook postInstall + ''; + + # `adapter` will find python binary and libraries at runtime. + postFixup = '' + wrapProgram $out/$installPrefix/adapter/codelldb \ + --prefix PATH : "${python3}/bin" \ + --prefix LD_LIBRARY_PATH : "${python3}/lib" + ''; + + passthru = { + inherit lldb adapter; + }; + + meta = with lib; { + description = "A native debugger extension for VSCode based on LLDB"; + homepage = "https://github.com/vadimcn/vscode-lldb"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ oxalica ]; + platforms = platforms.all; + broken = stdenv.isDarwin; # Build failed on x86_64-darwin currently. + }; +} diff --git a/pkgs/misc/vscode-extensions/vscode-lldb/lldb.nix b/pkgs/misc/vscode-extensions/vscode-lldb/lldb.nix new file mode 100644 index 00000000000..e04e9ad0b5b --- /dev/null +++ b/pkgs/misc/vscode-extensions/vscode-lldb/lldb.nix @@ -0,0 +1,23 @@ +# Patched lldb for Rust language support. +{ lldb_12, fetchFromGitHub }: +let + llvmSrc = fetchFromGitHub { + owner = "vadimcn"; + repo = "llvm-project"; + rev = "f2e9ff34256cd8c6feaf14359f88ad3f538ed687"; + sha256 = "sha256-5UsCBu3rtt+l2HZiCswoQJPPh8T6y471TBF4AypdF9I="; + }; +in lldb_12.overrideAttrs (oldAttrs: { + src = "${llvmSrc}/lldb"; + + passthru = (oldAttrs.passthru or {}) // { + inherit llvmSrc; + }; + + doInstallCheck = true; + postInstallCheck = (oldAttrs.postInstallCheck or "") + '' + versionOutput="$($out/bin/lldb --version)" + echo "'lldb --version' returns: $versionOutput" + echo "$versionOutput" | grep -q 'rust-enabled' + ''; +}) diff --git a/pkgs/misc/vscode-extensions/vscode-lldb/reset-cargo-config.patch b/pkgs/misc/vscode-extensions/vscode-lldb/reset-cargo-config.patch new file mode 100644 index 00000000000..e95df0a9cef --- /dev/null +++ b/pkgs/misc/vscode-extensions/vscode-lldb/reset-cargo-config.patch @@ -0,0 +1,19 @@ +diff --git a/.cargo/config b/.cargo/config +index c3c75e4..e69de29 100644 +--- a/.cargo/config ++++ b/.cargo/config +@@ -1,14 +0,0 @@ +-[build] +-target-dir = "build/target" +- +-[target.armv7-unknown-linux-gnueabihf] +-rustflags = [ +- "-C", "link-arg=-fuse-ld=lld", +- "-C", "link-arg=--target=armv7-unknown-linux-gnueabihf", +-] +- +-[target.aarch64-unknown-linux-gnu] +-rustflags = [ +- "-C", "link-arg=-fuse-ld=lld", +- "-C", "link-arg=--target=aarch64-unknown-linux-gnu", +-] diff --git a/pkgs/misc/vscode-extensions/vscode-lldb/update.sh b/pkgs/misc/vscode-extensions/vscode-lldb/update.sh new file mode 100755 index 00000000000..8511ea3b12e --- /dev/null +++ b/pkgs/misc/vscode-extensions/vscode-lldb/update.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p jq nix-prefetch +set -eo pipefail +cd "$(dirname "${BASH_SOURCE[0]}")" +if [[ $# -ne 1 ]]; then + echo "Usage: ./update.sh <version>" + exit 1 +fi + +echo " +FIXME: This script doesn't update patched lldb. Please manually check branches +of https://github.com/vadimcn/llvm-project and update lldb with correct version of LLVM. +" + +nixpkgs=../../../.. +nixFile=./default.nix +owner=vadimcn +repo=vscode-lldb +version="$1" + +sed -E 's/\bversion = ".*?"/version = "'$version'"/' --in-place "$nixFile" +srcHash=$(nix-prefetch fetchFromGitHub --owner vadimcn --repo vscode-lldb --rev "v$version" --fetchSubmodules) +sed -E 's#\bsha256 = ".*?"#sha256 = "'$srcHash'"#' --in-place "$nixFile" +cargoHash=$(nix-prefetch "{ sha256 }: (import $nixpkgs {}).vscode-extensions.vadimcn.vscode-lldb.adapter.cargoDeps.overrideAttrs (_: { outputHash = sha256; })") +sed -E 's#\bcargoSha256 = ".*?"#cargoSha256 = "'$cargoHash'"#' --in-place "$nixFile" + +src="$(nix-build $nixpkgs -A vscode-extensions.vadimcn.vscode-lldb.src --no-out-link)" +jq '{ name, version: $version, dependencies: (.dependencies + .devDependencies) }' \ + --arg version "$version" \ + "$src/package.json" \ + > build-deps/package.json + +# FIXME: vsce@1.93.0 breaks the build. +sed 's/"vsce": ".*"/"vsce": "=1.88.0"/' --in-place build-deps/package.json + +# Regenerate nodePackages. +cd "$nixpkgs/pkgs/development/node-packages" +exec ./generate.sh diff --git a/pkgs/misc/vscode-extensions/vscodeEnv.nix b/pkgs/misc/vscode-extensions/vscodeEnv.nix index 6e4bb7b3ea8..7c58a4bdfb3 100644 --- a/pkgs/misc/vscode-extensions/vscodeEnv.nix +++ b/pkgs/misc/vscode-extensions/vscodeEnv.nix @@ -21,13 +21,13 @@ , user-data-dir ? ''"''${TMP}''${name}"/vscode-data-dir'' # if file exists will use it and import the extensions in it into this dervation else will use empty extensions list # this file will be created/updated by vscodeExts2nix when vscode exists -, mutableExtensionsFile +, mutableExtensionsFile }: -let +let mutableExtensionsFilePath = toString mutableExtensionsFile; - mutableExtensions = if builtins.pathExists mutableExtensionsFile + mutableExtensions = if builtins.pathExists mutableExtensionsFile then import mutableExtensionsFilePath else []; - vscodeWithConfiguration = import ./vscodeWithConfiguration.nix { + vscodeWithConfiguration = import ./vscodeWithConfiguration.nix { inherit lib writeShellScriptBin extensionsFromVscodeMarketplace; vscodeDefault = vscode; } @@ -63,19 +63,19 @@ let symlinkFromUserSetting = (user-data-dir != ""); }; - vscodeExts2nix = import ./vscodeExts2nix.nix { + vscodeExts2nix = import ./vscodeExts2nix.nix { inherit lib writeShellScriptBin; vscodeDefault = vscodeWithConfiguration; } { extensionsToIgnore = nixExtensions; - extensions = mutableExtensions; + extensions = mutableExtensions; }; code = writeShellScriptBin "code" '' ${updateSettingsCmd}/bin/vscodeNixUpdate-settings ${updateLaunchCmd}/bin/vscodeNixUpdate-launch ${updateKeybindingsCmd}/bin/vscodeNixUpdate-keybindings - ${vscodeWithConfiguration}/bin/code --wait "$@" + ${vscodeWithConfiguration}/bin/code --wait "$@" echo 'running vscodeExts2nix to update ${mutableExtensionsFilePath}...' ${vscodeExts2nix}/bin/vscodeExts2nix > ${mutableExtensionsFilePath} ''; diff --git a/pkgs/misc/vscode-extensions/vscodeEnvTest.nix b/pkgs/misc/vscode-extensions/vscodeEnvTest.nix index d7e586cab6e..19a9edbf1af 100644 --- a/pkgs/misc/vscode-extensions/vscodeEnvTest.nix +++ b/pkgs/misc/vscode-extensions/vscodeEnvTest.nix @@ -1,5 +1,5 @@ with import <nixpkgs>{}; -callPackage (import ./vscodeEnv.nix) { +callPackage (import ./vscodeEnv.nix) { extensionsFromVscodeMarketplace = vscode-utils.extensionsFromVscodeMarketplace; vscodeDefault = vscode; } { @@ -9,4 +9,3 @@ callPackage (import ./vscodeEnv.nix) { t = "test"; }; } - diff --git a/pkgs/misc/vscode-extensions/vscodeExts2nix.nix b/pkgs/misc/vscode-extensions/vscodeExts2nix.nix index afd176b4c5e..58cbe663c90 100644 --- a/pkgs/misc/vscode-extensions/vscodeExts2nix.nix +++ b/pkgs/misc/vscode-extensions/vscodeExts2nix.nix @@ -1,24 +1,24 @@ -# based on the passed vscode will stdout a nix expression with the installed vscode extensions +# based on the passed vscode will stdout a nix expression with the installed vscode extensions { lib , vscodeDefault , writeShellScriptBin }: ##User input -{ vscode ? vscodeDefault +{ vscode ? vscodeDefault , extensionsToIgnore ? [] # will use those extensions to get sha256 if still exists when executed. -, extensions ? [] +, extensions ? [] }: -let +let mktplcExtRefToFetchArgs = import ./mktplcExtRefToFetchArgs.nix; in writeShellScriptBin "vscodeExts2nix" '' - echo '[' + echo '[' for line in $(${vscode}/bin/code --list-extensions --show-versions \ ${lib.optionalString (extensionsToIgnore != []) '' - | grep -v -i '^\(${lib.concatMapStringsSep "\\|" (e : ''${e.publisher}.${e.name}'') extensionsToIgnore}\)' + | grep -v -i '^\(${lib.concatMapStringsSep "\\|" (e : "${e.publisher}.${e.name}") extensionsToIgnore}\)' ''} ) ; do [[ $line =~ ([^.]*)\.([^@]*)@(.*) ]] @@ -26,7 +26,7 @@ writeShellScriptBin "vscodeExts2nix" '' publisher=''${BASH_REMATCH[1]} version=''${BASH_REMATCH[3]} - extensions="${lib.concatMapStringsSep "." (e : ''${e.publisher}${e.name}@${e.sha256}'') extensions}" + extensions="${lib.concatMapStringsSep "." (e : "${e.publisher}${e.name}@${e.sha256}") extensions}" reCurrentExt=$publisher$name"@([^.]*)" if [[ $extensions =~ $reCurrentExt ]]; then sha256=''${BASH_REMATCH[1]} diff --git a/pkgs/misc/vscode-extensions/vscodeWithConfiguration.nix b/pkgs/misc/vscode-extensions/vscodeWithConfiguration.nix index f15d14c7441..39479d7c2f2 100644 --- a/pkgs/misc/vscode-extensions/vscodeWithConfiguration.nix +++ b/pkgs/misc/vscode-extensions/vscodeWithConfiguration.nix @@ -1,54 +1,54 @@ # wrapper over vscode to control extensions per project (extensions folder will be created in execution path) -{ lib -, writeShellScriptBin -, extensionsFromVscodeMarketplace +{ lib +, writeShellScriptBin +, extensionsFromVscodeMarketplace , vscodeDefault }: ## User input -{ vscode ? vscodeDefault +{ vscode ? vscodeDefault # extensions to be symlinked into the project's extensions folder -, nixExtensions ? [] +, nixExtensions ? [] # extensions to be copied into the project's extensions folder -, mutableExtensions ? [] -, vscodeExtsFolderName ? ".vscode-exts" +, mutableExtensions ? [] +, vscodeExtsFolderName ? ".vscode-exts" , user-data-dir ? ''"''${TMP}vscodeWithConfiguration/vscode-data-dir"'' }: -let +let nixExtsDrvs = extensionsFromVscodeMarketplace nixExtensions; mutExtsDrvs = extensionsFromVscodeMarketplace mutableExtensions; - mutableExtsPaths = lib.forEach mutExtsDrvs ( e: + mutableExtsPaths = lib.forEach mutExtsDrvs ( e: { - origin = ''${e}/share/vscode/extensions/${e.vscodeExtUniqueId}''; - target = ''${vscodeExtsFolderName}/${e.vscodeExtUniqueId}-${(lib.findSingle (ext: ''${ext.publisher}.${ext.name}'' == e.vscodeExtUniqueId) "" "m" mutableExtensions ).version}''; + origin = "${e}/share/vscode/extensions/${e.vscodeExtUniqueId}"; + target = ''${vscodeExtsFolderName}/${e.vscodeExtUniqueId}-${(lib.findSingle (ext: "${ext.publisher}.${ext.name}" == e.vscodeExtUniqueId) "" "m" mutableExtensions ).version}''; } ); #removed not defined extensions rmExtensions = lib.optionalString (nixExtensions++mutableExtensions != []) '' find ${vscodeExtsFolderName} -mindepth 1 -maxdepth 1 ${ - lib.concatMapStringsSep " " (e : ''! -iname ${e.publisher}.${e.name} '') nixExtensions + lib.concatMapStringsSep " " (e : "! -iname ${e.publisher}.${e.name} ") nixExtensions + - lib.concatMapStringsSep " " (e : ''! -iname ${e.publisher}.${e.name}-${e.version} '') mutableExtensions + lib.concatMapStringsSep " " (e : "! -iname ${e.publisher}.${e.name}-${e.version} ") mutableExtensions } -exec rm -rf {} \; ''; #copy mutable extension out of the nix store cpExtensions = '' - ${lib.concatMapStringsSep "\n" (e : ''ln -sfn ${e}/share/vscode/extensions/* ${vscodeExtsFolderName}/'') nixExtsDrvs} + ${lib.concatMapStringsSep "\n" (e : "ln -sfn ${e}/share/vscode/extensions/* ${vscodeExtsFolderName}/") nixExtsDrvs} ${lib.concatMapStringsSep "\n" (ePath : '' if [ ! -d ${ePath.target} ]; then cp -a ${ePath.origin} ${ePath.target} chmod -R u+rwx ${ePath.target} fi - '') mutableExtsPaths} + '') mutableExtsPaths} ''; in writeShellScriptBin "code" '' - if ! [[ "$@" =~ "--list-extension" ]]; then - mkdir -p "${vscodeExtsFolderName}" + if ! [[ "$@" =~ "--list-extension" ]]; then + mkdir -p "${vscodeExtsFolderName}" ${rmExtensions} ${cpExtensions} fi - ${vscode}/bin/code --extensions-dir "${vscodeExtsFolderName}" ${ - lib.optionalString (user-data-dir != "") ''--user-data-dir ${user-data-dir }'' + ${vscode}/bin/code --extensions-dir "${vscodeExtsFolderName}" ${ + lib.optionalString (user-data-dir != "") "--user-data-dir ${user-data-dir}" } "$@" '' diff --git a/pkgs/misc/vscode-extensions/wakatime/default.nix b/pkgs/misc/vscode-extensions/wakatime/default.nix index 30b2f94f1a5..7290c04342e 100644 --- a/pkgs/misc/vscode-extensions/wakatime/default.nix +++ b/pkgs/misc/vscode-extensions/wakatime/default.nix @@ -1,4 +1,4 @@ -{ stdenv +{ lib , wakatime, vscode-utils }: let @@ -8,16 +8,16 @@ in mktplcRef = { name = "vscode-wakatime"; publisher = "WakaTime"; - version = "4.0.0"; - sha256 = "0bwxz8dg00k8frnvkvcngll5yaf9k7z13dg309vmw8xbdgkiyid4"; + version = "4.0.9"; + sha256 = "0sm2fr9zbk1759r52dpnz9r7xbvxladlpinlf2i0hyaa06bhp3b1"; }; postPatch = '' - mkdir -p wakatime-master - cp -rt wakatime-master --no-preserve=all ${wakatime}/lib/python*/site-packages/wakatime + mkdir wakatime-cli + ln -s ${wakatime}/bin/wakatime ./wakatime-cli/wakatime-cli ''; - meta = with stdenv.lib; { + meta = with lib; { description = '' Visual Studio Code plugin for automatic time tracking and metrics generated from your programming activity |