Giter Club home page Giter Club logo

nix-vscode-extensions's Introduction

Nix expressions for VS Code Extensions

At the time of writing this, nixpkgs contains 271 VS Code extensions. This is a small fraction of the more than 40,000 extensions in the VS Code Marketplace! In addition, many of the extensions in nixpkgs are significantly out-of-date.

This flake provides Nix expressions for the majority of available extensions from Open VSX and VS Code Marketplace. A GitHub Action updates the extensions daily.

That said, you can now use a different set of extensions for VS Code/VSCodium in each of your projects. Moreover, you can share your flakes and cache them so that other people don't need to install these extensions manually!

Note

  • Check nix4vscode (and contribute!) if you need a more individual approach to extensions.
  • NixOS wiki has a page about VS Code.
  • Extension publishers and names are lowercased only in Nix.
  • Access an extension in the format <attrset>.<publisher>.<name>, where <attrset> is vscode-marketplace, open-vsx, etc. (see Explore).
  • If an extension publisher or name aren't valid Nix identifiers, quote them like <attrset>."4"."2".
  • We have a permission from MS to use a crawler on their API in this case (see the discussion). Please, don't abuse this flake!

Template

This repository has a flake template. This template provides a VSCodium with a couple of extensions.

  1. Create a flake from the template (see nix flake new).

    nix flake new vscodium-project -t github:nix-community/nix-vscode-extensions
    cd vscodium-project
    git init && git add .
  2. Run VSCodium.

    nix run .# .
  3. Alternatively, start a devShell and run VSCodium. A shellHook will print extensions available in the VSCodium.

    nix develop
    codium .

In case of problems see Troubleshooting.

Example

flake.nix provides a default package. This package is VSCodium with a couple of extensions.

Run VSCodium and list installed extensions.

nix run github:nix-community/nix-vscode-extensions# -- --list-extensions

Usage

Extensions

We provide extensions attrsets that contain both universal and platform-specific extensions. We use a reasonable mapping between the sites target platforms and Nix-supported platforms (see the issue and systemPlatform in flake.nix).

There are several attrsets:

  • vscode-marketplace and open-vsx contain the latest versions of extensions, including pre-release ones. Such pre-release versions expire in some time. That's why, there are -release attrsets.
  • vscode-marketplace-release and open-vsx-release contain the release versions of extensions (see Release extensions).
  • forVSCodeVersion "4.228.1" allows to leave only the extensions compatible with the "4.228.1" version of VS Code.
    • You may supply the actual version of your VS Code instead of "4.228.1".

Note

In with A; with B;, the attributes of B shadow the attributes of A. Keep in mind this property of with when writing with vscode-marketplace; with vscode-marketplace-release;. See With-expressions.

With flakes

See Template.

Add the following to your flake.nix (see Flakes).

inputs.nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";

Without flakes

let 
  system = builtins.currentSystem;
  extensions =
    (import (builtins.fetchGit {
      url = "https://github.com/nix-community/nix-vscode-extensions";
      ref = "refs/heads/master";
      rev = "c43d9089df96cf8aca157762ed0e2ddca9fcd71e";
    })).extensions.${system};
  extensionsList = with extensions.vscode-marketplace; [
      rust-lang.rust-analyzer
  ];
in ...

History

You can search for an extension in the repo history:

  • get commits containing the extension: git log -S '"copilot"' --oneline data/cache/vscode-marketplace-latest.json
  • select a commit: 0910d1e
  • search in that commit: git grep '"copilot"' 0910d1e -- data/cache/vscode-marketplace-latest.json

Explore

Explore extensions via nix repl.

Use your system instead of x86_64-linux.

Press the Tab button (denoted as <TAB> here) to see attrset attributes.

Get the extensions attrset

Get extensions with flakes

$ nix repl

nix-repl> :lf github:nix-community/nix-vscode-extensions/c43d9089df96cf8aca157762ed0e2ddca9fcd71e
Added 10 variables.

nix-repl> t = extensions.<TAB>
extensions.aarch64-darwin  extensions.aarch64-linux   extensions.x86_64-darwin   extensions.x86_64-linux

nix-repl> t = extensions.x86_64-linux

nix-repl> t.<TAB>
t.forVSCodeVersion            t.open-vsx-release            t.vscode-marketplace-release
t.open-vsx                    t.vscode-marketplace

Get extensions without flakes

$ nix repl

nix-repl> t1 = (import (builtins.fetchGit {
                url = "https://github.com/nix-community/nix-vscode-extensions";
                ref = "refs/heads/master";
                rev = "c43d9089df96cf8aca157762ed0e2ddca9fcd71e";
              }))

nix-repl> t = t1.extensions.<TAB>
t1.extensions.aarch64-darwin  t1.extensions.aarch64-linux   t1.extensions.x86_64-darwin   t1.extensions.x86_64-linux

nix-repl> t = t1.extensions.x86_64-linux

nix-repl> t.<TAB>
t.forVSCodeVersion            t.open-vsx-release            t.vscode-marketplace-release
t.open-vsx                    t.vscode-marketplace

Pre-release versions

nix-repl> t.vscode-marketplace.rust-lang.rust-analyzer
«derivation /nix/store/jyzab0pdcgj4q9l73zsnyvc1k7qpb381-vscode-extension-rust-lang-rust-analyzer-0.4.1582.drv»

Release versions

nix-repl> t.vscode-marketplace-release.rust-lang.rust-analyzer
«derivation /nix/store/qjlr7iqgqrf2hd2z21xz96nmblxy680m-vscode-extension-rust-lang-rust-analyzer-0.3.1583.drv»

Pre-release versions compatible with a given version of VS Code

nix-repl> (t.forVSCodeVersion "1.78.2").vscode-marketplace.rust-lang.rust-analyzer
«derivation /nix/store/jyzab0pdcgj4q9l73zsnyvc1k7qpb381-vscode-extension-rust-lang-rust-analyzer-0.4.1582.drv»

Overlay

See Overlays.

Get an overlay with flakes

nix-repl> :lf github:nix-community/nix-vscode-extensions/c43d9089df96cf8aca157762ed0e2ddca9fcd71e
Added 14 variables.

nix-repl> pkgs = (legacyPackages.x86_64-linux.extend overlays.default)

nix-repl> pkgs.vscode-marketplace-release.rust-lang.rust-analyzer
«derivation /nix/store/midv6wrnpxfm3in3miilyx914zzck4d7-vscode-extension-rust-lang-rust-analyzer-0.3.1575.drv»

Get an overlay without flakes

nix-repl> t1 = (import (builtins.fetchGit {
                url = "https://github.com/nix-community/nix-vscode-extensions";
                ref = "refs/heads/master";
                rev = "c43d9089df96cf8aca157762ed0e2ddca9fcd71e";
              }))

nix-repl> pkgs = import <nixpkgs> { overlays = [ t1.overlays.default ]; system = builtins.currentSystem; }

nix-repl> pkgs.vscode-marketplace-release.rust-lang.rust-analyzer
«derivation /nix/store/a701wlb8ckidpikr57bff16mmvsf3jir-vscode-extension-rust-lang-rust-analyzer-0.3.1575.drv»

Contribute

Issues

Resolve issues.

README

  • Fix links.
  • Write new sections.
  • Update commit SHA used in examples if they're too old.
  • Enhance text.

Release extensions

The config contains several extensions. We cache the information about the latest release versions of these extensions (see Extensions).

You can add new extensions to the config and make a Pull Request. Use the original extension publisher and name, e.g. GitHub and copilot.

Extra extensions

The extra-extensions.toml file contains a list of extensions to be fetched from sites other than VS Code Marketplace and Open VSX. These extensions replace ones fetched from VS Code Marketplace and Open VSX. Add necessary extensions there, preferrably, for all supported platforms (see Extensions). nvfetcher will fetch the latest release versions of these extensions and write configs to generated.nix.

Special extensions

Certain extensions require special treatment. Provide functions to modify such extensions derivations in overrides.nix. Optionally, create and link there issues explaining chosen override functions. The overrides apply to a whole attrset of extensions, including Extra extensions.

Build problems

  • Extension with multiple extensions in a zipfile (issue)
  • Platform-specific extensions (comment)

Main flake

  1. (Optionally) Install direnv, e.g., via nix profile install nixpkgs#direnv.

  2. Run a devshell. When prompted about extra-trusted-substituters answer y. This is to use binary caches.

    nix develop nix-dev/
  3. (Optionally) Start VSCodium with necessary extensions and tools.

    nix run nix-dev/#writeSettings
    nix run nix-dev/#codium .

Haskell script

  1. See the README.

  2. Set the environment.

    set -a
    source .env
  3. Run the script.

    nix run haskell/#updateExtensions

Pull requests

Pull requests are welcome!

Troubleshooting

  • If Nix-provided VSCodium doesn't pick up the extensions:
    • Close other instance of Nix-provided VSCodium.
    • Try to reboot your computer and start VSCodium again.
  • See troubleshooting.

nix-vscode-extensions's People

Contributors

ameertaweel avatar chanceharrison avatar deemp avatar donteatoreo avatar figsoda avatar marksisson avatar minersebas avatar piousdeer avatar yacinehmito avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

nix-vscode-extensions's Issues

Attempting to use ziglang extension fails

If I do "nix develop --show-trace", attempting to use ziglang results in an error:

I checked using the method documented and it appears to exist:

nix-repl> t.open-vsx.zig<tab>
t.open-vsx.ziglang  t.open-vsx.zignd

However, it fails with :

error:
       … while calling the 'derivationStrict' builtin

         at //builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'nix-shell'
         whose name attribute is located at /nix/store/ivbddh1g0p4rc85lksflqp2clcpfqfp3-source/pkgs/stdenv/generic/make-derivation.nix:303:7

       … while evaluating attribute 'buildInputs' of derivation 'nix-shell'

         at /nix/store/ivbddh1g0p4rc85lksflqp2clcpfqfp3-source/pkgs/stdenv/generic/make-derivation.nix:350:7:

          349|       depsHostHost                = lib.elemAt (lib.elemAt dependencies 1) 0;
          350|       buildInputs                 = lib.elemAt (lib.elemAt dependencies 1) 1;
             |       ^
          351|       depsTargetTarget            = lib.elemAt (lib.elemAt dependencies 2) 0;

       … while evaluating derivation 'vscodium-with-extensions-1.78.2.23132'
         whose name attribute is located at /nix/store/ivbddh1g0p4rc85lksflqp2clcpfqfp3-source/pkgs/stdenv/generic/make-derivation.nix:303:7

       … while evaluating attribute 'buildCommand' of derivation 'vscodium-with-extensions-1.78.2.23132'

         at /nix/store/ivbddh1g0p4rc85lksflqp2clcpfqfp3-source/pkgs/build-support/trivial-builders/default.nix:87:14:

           86|       enableParallelBuilding = true;
           87|       inherit buildCommand name;
             |              ^
           88|       passAsFile = [ "buildCommand" ]

       … while evaluating derivation 'vscode-extensions'
         whose name attribute is located at /nix/store/ivbddh1g0p4rc85lksflqp2clcpfqfp3-source/pkgs/stdenv/generic/make-derivation.nix:303:7

       … while evaluating attribute 'passAsFile' of derivation 'vscode-extensions'

         at /nix/store/ivbddh1g0p4rc85lksflqp2clcpfqfp3-source/pkgs/build-support/trivial-builders/default.nix:88:7:

           87|       inherit buildCommand name;
           88|       passAsFile = [ "buildCommand" ]
             |       ^
           89|         ++ (derivationArgs.passAsFile or []);

       … while evaluating derivation 'vscode-extensions-json'
         whose name attribute is located at /nix/store/ivbddh1g0p4rc85lksflqp2clcpfqfp3-source/pkgs/stdenv/generic/make-derivation.nix:303:7

       … while evaluating attribute 'text' of derivation 'vscode-extensions-json'

         at /nix/store/ivbddh1g0p4rc85lksflqp2clcpfqfp3-source/pkgs/build-support/trivial-builders/default.nix:139:16:

          138|     runCommand name
          139|       { inherit text executable checkPhase meta allowSubstitutes preferLocalBuild;
             |                ^
          140|         passAsFile = [ "text" ];

       … from call site

         at /nix/store/ivbddh1g0p4rc85lksflqp2clcpfqfp3-source/pkgs/applications/editors/vscode/with-extensions.nix:52:12:

           51|     destination = "/share/vscode/extensions/extensions.json";
           52|     text = vscode-utils.toExtensionJson vscodeExtensions;
             |            ^
           53|   };

       … while calling 'toExtensionJson'

         at /nix/store/ivbddh1g0p4rc85lksflqp2clcpfqfp3-source/pkgs/applications/editors/vscode/extensions/vscode-utils.nix:132:21:

          131|
          132|   toExtensionJson = extensions: builtins.toJSON (map toExtensionJsonEntry extensions);
             |                     ^
          133| in

       error: attribute 'vscodeExtUniqueId' missing

       at /nix/store/ivbddh1g0p4rc85lksflqp2clcpfqfp3-source/pkgs/applications/editors/vscode/extensions/vscode-utils.nix:106:12:

          105|     identifier = {
          106|       id = ext.vscodeExtUniqueId;
             |            ^
          107|       uuid = "";

My flake.nix is basically a copy of the template as follows:

> cat flake.nix
{
  inputs = {
    nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
    flake-utils.follows = "nix-vscode-extensions/flake-utils";
    nixpkgs.follows = "nix-vscode-extensions/nixpkgs";
  };

  outputs = inputs:
    inputs.flake-utils.lib.eachDefaultSystem
      (system:
        let
          pkgs = inputs.nixpkgs.legacyPackages.${system};
          extensions = inputs.nix-vscode-extensions.extensions.${system};
          inherit (pkgs) vscode-with-extensions vscodium;

          packages.default =
            vscode-with-extensions.override {
              vscode = vscodium;
              vscodeExtensions = [
                extensions.vscode-marketplace.golang.go
                extensions.open-vsx.ziglang  # <-- This line causes a failure
                extensions.open-vsx-release.rust-lang.rust-analyzer
              ];
            };

          devShells.default = pkgs.mkShell {
            buildInputs = [ packages.default ];
            shellHook = ''
              printf "VSCodium with extensions:\n"
              codium --list-extensions
            '';
          };
        in
        {
          inherit packages devShells;
        });
}

Thanks.

error: attribute 'vscodeExtPublisher' missing

When trying to add extensions using this flake I'm seeing the error attribute 'vscodeExtPublisher' missing. I ran nix flake update last Friday, where I could build my configuration successfully. I tried using the example with the nix repl found here and the error is present there as seen below:

$ nix repl
Welcome to Nix 2.11.1. Type :? for help.

nix-repl> :lf .
Added 18 variables.

nix-repl> inputs.nix-vscode-extensions.extensions.x86_64-linux.vscode-marketplace.golang.go
error: attribute 'vscodeExtPublisher' missing

       at /nix/store/z8z0bjp8y8ah0qy1kwhgzhiklp0cqibq-source/flake.nix:42:52:

           41|                 }))
           42|                 (builtins.groupBy ({ value, ... }: value.vscodeExtPublisher))
             |                                                    ^
           43|                 (builtins.mapAttrs (_: lib.listToAttrs))

nix-repl> inputs.nix-vscode-extensions.extensions.x86_64-linux.open-vsx.golang.go 
error: attribute 'vscodeExtPublisher' missing

       at /nix/store/z8z0bjp8y8ah0qy1kwhgzhiklp0cqibq-source/flake.nix:42:52:

           41|                 }))
           42|                 (builtins.groupBy ({ value, ... }: value.vscodeExtPublisher))
             |                                                    ^
           43|                 (builtins.mapAttrs (_: lib.listToAttrs))

nix-repl> 

Looking through the commit history, it seems to be caused by the changes in 46be1e7, since the line that is referenced in the error message was added in this commit.

I've unfortunately not had time to look into what could resolve this issue.

Please let me know if you need any additional information or I can help out in any other way. This flake is great and it's made it much easier for me to maintain my configuration, so I'll be happy to help out if I can.

Impossible to get the latest version of Vue.volar

Platform-specific extensions take precedence over universal extensions. In the case of the official Vue extension (Vue.volar), new versions do not provide a platform-specific revision. It means that the last version that has platform-specific revision (1.2.0) overrides the latest version (2.0.8 as of writing). Here is an excerpt of the JSON file:

{"engineVersion":"^1.82.0","lastUpdated":"2024-03-28T22:58:46.19Z","missingTimes":0,"name":"volar","platform":"universal","publisher":"vue","sha256":"sha256-OBHMLSuOs7kuiY0zs6E9ZhGZ3xkuJtMv0jbMRJdT3u4=","version":"2.0.8"}
, {"engineVersion":"^1.67.0","lastUpdated":"2023-02-25T00:09:41.69Z","missingTimes":0,"name":"volar","platform":"linux-x64","publisher":"vue","sha256":"sha256-mNfva56RWBjWKnod4fGZZxKkAzIWWPNtMirNiLMDtVo=","version":"1.2.0"}
, {"engineVersion":"^1.67.0","lastUpdated":"2023-02-25T00:09:15.983Z","missingTimes":0,"name":"volar","platform":"linux-arm64","publisher":"vue","sha256":"sha256-I2wD+7vLv8dn+kAN93TkNkMycEnLxjFhZqAXKPWUWP8=","version":"1.2.0"}
, {"engineVersion":"^1.67.0","lastUpdated":"2023-02-25T00:10:20.397Z","missingTimes":0,"name":"volar","platform":"darwin-x64","publisher":"vue","sha256":"sha256-FLFSNdDtK6pvC06wU69GFhuEQfIS4n13mFUrB37/Rso=","version":"1.2.0"}
, {"engineVersion":"^1.67.0","lastUpdated":"2023-02-25T00:09:46.947Z","missingTimes":0,"name":"volar","platform":"darwin-arm64","publisher":"vue","sha256":"sha256-pO5wfZwkj3fztVpsVRefpbuRDq6BMPUNSB+NhExu4Gg=","version":"1.2.0"}

How can this be solved? I am willing to contribute but I don't know what would behavior would be preferable. Some options:

  • Prioritize latest versions first; only override universal extension by a platform extension if they are of the same vrsion.
  • Allow for adding a minimum version of extensions to be included in the JSON file. In the case of Vue, we could for example set it to 2.0.0, meaning that the lines for version 1.2.0 would disappear.
  • Make the overriding behavior configurable per extension (i.e. for Volar, universal takes precedence over platform-specific)

github actions

cc @nix-community/infra @deemp @AmeerTaweel

I've disabled github actions on this repo, just now it was using all of the organisations quota. (20 parallel jobs that had already been running for 3 hours)

build codelldb from github

the codelldb in marketplace is just a downloader, it download the truely plugin from github .

if it's possible replace codelldb with the github ones?

I build codelldb by this codes:

  vscode-lldb = pkgs.vscode-utils.buildVscodeExtension {
    name = "vadimcn.vscode-lldb";
    vscodeExtPublisher = "vadimcn";
    vscodeExtName = "codelldb";
    src = (pkgs.fetchurl {
      url = "https://github.com/vadimcn/codelldb/releases/download/v1.9.2/codelldb-x86_64-linux.vsix";
      sha256 = "sha256-iYvSKyUFsSZx/ufS/hq7OE3GDRP1/sK0tlDQ2sP4PXU=";
      name = "codelldb.zip";
    }).outPath;
    vscodeExtUniqueId = "vadimcn.vscode-lldb";
    version = "1.9.2";
  };

Tweak User Settings

Is there any way built into the flake to add configuration settings for VSCode? I tried to unsuccessfully find parameters for it.

These are the current config options that I use in my Home Manager VSCode config: https://github.com/heywoodlh/nixos-configs/blob/master/roles/home-manager/desktop.nix#L27-L58

I'd love to be able to use those types of configs with this flake.

I suspect it shouldn't be too difficult to add a config file, but before trying to come up with a solution myself, I thought I would ask, as it seems like something that could be already supported.

(Also, thanks to all involved for such a great flake!)

Some extensions b*tch about not being able to write into the extensions directory

Noticed this at the console:

Error while activating TypeScript/JavaScript: {"errno":-2,"code":"ENOENT","syscall":"stat","path":"/nix/store/lc0l4y05jrfpqr5j5h70pjchpx801h6y-vscode-extension-visualstudioexptteam-vscodeintellicode-1.2.30/share/vscode/extensions/visualstudioexptteam.vscodeintellicode/cache"}.

I suppose this extension in particular isn't following the best practices and stuff, but I wonder what would be a fix that doesn't depend on upstream.

@parcel/watcher prebuild not found in nrwl.angular-console

I'm attempting to get the nx console to work. The console opens, but then throws up error about its client not working. The console is inoperable after that.

Error: No prebuild or local build of @parcel/watcher found. Tried @parcel/watcher-linux-x64-glibc. Please ensure it is installed (don't use --no-optional when installing with npm). Otherwise it is possible we don't support your platform yet. If this is the case, please report an issue to https://github.com/parcel-bundler/watcher.
    at Object.<anonymous> (/nix/store/hpxn0nksskra5x476x1dab5abpi5l706-vscode-extension-nrwl-angular-console-18.6.0/share/vscode/extensions/nrwl.angular-console/node_modules/@parcel/watcher/index.js:25:13)
    at Module._compile (node:internal/modules/cjs/loader:1188:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1243:10)
    at Module.load (node:internal/modules/cjs/loader:1058:32)
    at Module._load (node:internal/modules/cjs/loader:893:12)
    at f._load (node:electron/js2c/asar_bundle:2:13330)
    at Module.require (node:internal/modules/cjs/loader:1082:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/nix/store/hpxn0nksskra5x476x1dab5abpi5l706-vscode-extension-nrwl-angular-console-18.6.0/share/vscode/extensions/nrwl.angular-console/nxls/main.js:776:22675)
    at Module._compile (node:internal/modules/cjs/loader:1188:14)
[Error - 11:25:43 AM] The Nx Console Client server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
[Error - 11:25:43 AM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 11:25:43 AM] Nx Console Client client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 11:25:43 AM] Restarting server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 

Installing a local or global copy of @parcel/watcher doesn't help. See also nrwl/nx-console#1808

Filter out pre-release versions

Biggest pain for us right now is the gitlens extension, which we have to update every other day because nix-vscode-extensions points to a pre-release version and new pre-release versions require updating the extension otherwise the extension gets deactivated.

I wonder if the API that is crawled has more information about stable vs. pre-release versions.

Consider inverting "release" and "latest"

Currently only a hand-craft set of extensions are fetched using their release versions, while everything else defaults to (almost always) preview releases. While this wouldn't be a proper fix for #41 it would improve the likelihood of finding a commit of this repo containing stable compatible extensions.

Open VSX 404 error because of lowercased URL

Currently on b2ca271 and found that open-vsx.wakatime.vscode-wakatime errors out:

trying https://open-vsx.org/api/wakatime/vscode-wakatime/24.2.0/file/wakatime.vscode-wakatime-24.2.0.vsix
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
^M  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--    0
curl: (22) The requested URL returned error: 404
error: cannot download vscode-wakatime-24.2.0.zip from any mirror

When compared with the correct link:

https://open-vsx.org/api/WakaTime/vscode-wakatime/24.2.0/file/WakaTime.vscode-wakatime-24.2.0.vsix

The difference is that the namespace WakaTime is not lowercased but retains its capitalization. Probably the same is also true for the extension ID, but in this case it's all lowercase.

As a quick workaround, vscode-marketplace.wakatime.vscode-wakatime works fine.

Github copilot missing

For some reason, github.copilot doesn't exist in vscode-marketplace, (though for some reason github.copilot-labs does exist). Is there any kind of filter happening in the job that pulls extensions?

ms-vscode.cpptools has rolled back to an old version (1.7.1 instead of 1.20.0)

I detected this issue because for some extensions, I'm using the derivation from upstream nixpkgs but the extension versions from nix-vscode-extensions. I'm running NixOS so I need the patches from nixpkgs for these extensions to work, but nixpkgs is slow to update VSCode extensions, so I use nix-vscode-extensions to get updates more frequently. (Yes, this setup tends to break often.)

Since commit 9a610ee, the flake exposes version 1.7.1 of ms-vscode.cpptools instead of 1.20.0 on x86_64-linux:

$ nix eval github:nix-community/nix-vscode-extensions/57e9fd03e06ce8f86fb31523f72d11e3026ff8a5#extensions.x86_64-linux.vscode-marketplace.ms-vscode.cpptools.version
"1.20.0"

$ nix eval github:nix-community/nix-vscode-extensions/9a610eef24e656d771df4097da761d458dd7fc97#extensions.x86_64-linux.vscode-marketplace.ms-vscode.cpptools.version
"1.7.1"

I noticed that in data/cache/vscode-marketplace-latest.json, there's a line for 1.7.1 of ms-vscode.cpptools for the "universal" platform, and in commit 9a610ee, it moved from before the more recent platform-specific lines to after them.

@@ -35369,34 +35621,38 @@
 , {"engineVersion":"^1.75.0","lastUpdated":"2024-01-19T23:50:59.02Z","missingTimes":0,"name":"azurecli","platform":"universal","publisher":"ms-vscode","sha256":"sha256-G+dDdAc4xeHYQRSx2e4KcwZnSyDOR5Y04NMGgJ1ztNM=","version":"0.6.0"}
 , {"engineVersion":"^1.6.0","lastUpdated":"2021-02-26T01:01:38.197Z","missingTimes":0,"name":"brackets-keybindings","platform":"universal","publisher":"ms-vscode","sha256":"sha256-FKn79LIxfuRcMZErlyEZOYoRU4jRYaKmldoeRPZLWA4=","version":"0.1.1"}
 , {"engineVersion":"^1.51.0","lastUpdated":"2021-02-26T01:00:52.19Z","missingTimes":0,"name":"brackets-pack","platform":"universal","publisher":"ms-vscode","sha256":"sha256-/5+cXP7LjNAru7QSZM4IXFcSEYRe84AsKQW9cefWlY8=","version":"0.1.1"}
-, {"engineVersion":"^1.63.0","lastUpdated":"2024-03-29T04:20:09.953Z","missingTimes":2,"name":"cmake-tools","platform":"universal","publisher":"ms-vscode","sha256":"sha256-/Bb1cKOxoXzNEdVfh4kWadFz1mpaqv57K+BbBBVzK2Y=","version":"1.18.16"}
-, {"engineVersion":"^1.63.0","lastUpdated":"2024-04-03T04:18:41.343Z","missingTimes":0,"name":"cmake-tools","platform":"universal","publisher":"ms-vscode","sha256":"sha256-SIIMglXX+OJVYUDcMgR7BPnJlXR1iX7ql1h2hCQQmN8=","version":"1.18.17"}
-, {"engineVersion":"^1.60.0","lastUpdated":"2021-10-20T02:54:55.43Z","missingTimes":0,"name":"cpptools","platform":"universal","publisher":"ms-vscode","sha256":"sha256-2vgkfpoQCA+1B4r3h2YjBhnxYf2inCojNDFXALh9hkE=","version":"1.7.1"}
+, {"engineVersion":"^1.63.0","lastUpdated":"2024-03-29T04:20:09.953Z","missingTimes":3,"name":"cmake-tools","platform":"universal","publisher":"ms-vscode","sha256":"sha256-/Bb1cKOxoXzNEdVfh4kWadFz1mpaqv57K+BbBBVzK2Y=","version":"1.18.16"}
+, {"engineVersion":"^1.63.0","lastUpdated":"2024-04-03T04:18:41.343Z","missingTimes":1,"name":"cmake-tools","platform":"universal","publisher":"ms-vscode","sha256":"sha256-SIIMglXX+OJVYUDcMgR7BPnJlXR1iX7ql1h2hCQQmN8=","version":"1.18.17"}
+, {"engineVersion":"^1.63.0","lastUpdated":"2024-04-05T04:17:37.663Z","missingTimes":0,"name":"cmake-tools","platform":"universal","publisher":"ms-vscode","sha256":"sha256-lxZFVW3P/tFF37/G0jSzO52xyB35rpB7TdYn4xBtXyA=","version":"1.18.19"}
 , {"engineVersion":"^1.67.0","lastUpdated":"2024-03-26T22:36:56.033Z","missingTimes":0,"name":"cpptools","platform":"linux-x64","publisher":"ms-vscode","sha256":"sha256-hnLIvqKXCwrVCPCX5zriZWf5om0m073qK19gubvgaq8=","version":"1.20.0"}
 , {"engineVersion":"^1.67.0","lastUpdated":"2024-03-26T22:35:36.363Z","missingTimes":0,"name":"cpptools","platform":"linux-arm64","publisher":"ms-vscode","sha256":"sha256-WMZxpaGWswH6cvd4DpdnkuV9Oabe4CFTPT5871/thAQ=","version":"1.20.0"}
 , {"engineVersion":"^1.67.0","lastUpdated":"2024-03-26T22:36:31.703Z","missingTimes":0,"name":"cpptools","platform":"darwin-x64","publisher":"ms-vscode","sha256":"sha256-5Xz7nzqSG7rhLLtogZqUy0vSgO4umlkMUzba3uL6tjk=","version":"1.20.0"}
 , {"engineVersion":"^1.67.0","lastUpdated":"2024-03-26T22:34:37.72Z","missingTimes":0,"name":"cpptools","platform":"darwin-arm64","publisher":"ms-vscode","sha256":"sha256-y7DhVcz3diTgTNHjIboyhoQ7R7AkB/UXJ5c5u8hav+8=","version":"1.20.0"}
+, {"engineVersion":"^1.60.0","lastUpdated":"2021-10-20T02:54:55.43Z","missingTimes":0,"name":"cpptools","platform":"universal","publisher":"ms-vscode","sha256":"sha256-2vgkfpoQCA+1B4r3h2YjBhnxYf2inCojNDFXALh9hkE=","version":"1.7.1"}
 , {"engineVersion":"^1.48.0","lastUpdated":"2022-09-01T21:59:39.913Z","missingTimes":0,"name":"cpptools-extension-pack","platform":"universal","publisher":"ms-vscode","sha256":"sha256-rHST7CYCVins3fqXC+FYiS5Xgcjmi7QW7M4yFrUR04U=","version":"1.3.0"}
 , {"engineVersion":"^1.30.0","lastUpdated":"2022-10-24T21:51:14.927Z","missingTimes":0,"name":"cpptools-themes","platform":"universal","publisher":"ms-vscode","sha256":"sha256-YWA5UsA+cgvI66uB9d9smwghmsqf3vZPFNpSCK+DJxc=","version":"2.0.0"}
 , {"engineVersion":"^1.65.0","lastUpdated":"2023-02-17T10:49:33.337Z","missingTimes":4,"name":"extension-activator","platform":"universal","publisher":"ms-vscode","sha256":"sha256-97mSebLFpaAROSIvp6U+GuB+Dsz8ndThEGaYBkFB6c0=","version":"0.0.2"}

Looking at earlier commits, it appears the change is intentional:

However, it doesn't appear to be working as expected. Perhaps a version sort is not implemented correctly somewhere and it thinks 1.7.1 is more recent than 1.20.0? (A naïve textual sort would indeed claim so.)

cc @yacinehmito, @deemp

deprecate nix-vscode-extensions in favor of nix4vscode

This issue is a result of the discussion of #41.

nix-vscode-extensions

Provides the latest versions of almost all extensions and release versions of chosen extensions from VS Code Marketplace and Open VSX.

Advantages

  • flake provides extension patches for all users (link)
  • doesn't require configuration files
  • supports VS Code Marketplace and Open VSX
  • flake is updated automatically via a GH Action
  • provides platform-specific extensions
  • extension info is in JSON format and can be reused without nix

Disadvantages

  • flake is large due to files with extensions config
  • doesn't provide extension versions compatible with the user's VS Code
  • not very maintainable due to a) Haskell and b) non-professional code
  • possibly can't be scaled to support release versions for all VS Code versions (link)
  • latest versions include pre-release versions that expire soon

nix4vscode

nix4vscode provides the latest versions compatible with a given VS Code version (see #41) for chosen extensions.

Advantages

  • provides extension versions compatible with the user's VS Code
  • generates expressions only for necessary extensions
  • written in Rust and seems to be maintainable
  • can be possibly scaled to all extensions and used in nixpkgs (link)

Disadvantages

  • doesn't provide extension patches for all users
  • requires a configuration file
  • a user has to generate expressions
  • doesn't provide platform-specific extensions (extensionFromVscodeMarketplace doesn't use platform)
  • extension info is in Nix and cannot be easily reused without nix
  • doesn't support Open VSX
  • is currently unstable

Summary

Despite some disadvantages, the approach of nix4vscode seems to be more promising than that of nix-vscode-extensions. In my opinion, most of nix4vscode disadvantages can be overcome. Then, it will be a truly personalized tool for getting VS Code extensions.

Suggestions

@deemp, @AmeerTaweel:

  • Don't implement the solution (link)
  • Decide if need to deprecate nix-vscode-extensions and at what stage of readiness of nix4vscode
  • If decide to eventually deprecate:
    • Edit README
      • Warn in the README of nix-vscode-extensions about deprecation and link this issue
      • Put into README a link to the nix4vscode repo
    • Edit wiki (link):
      • Link to nix4vscode instead of nix-vscode-extensions

@cathaysia

  • Transfer nix4vscode to nix-community to get more contributors
    • Perhaps @spikespaz will be interested to work on nix4vscode as it's written in Rust
  • Consider listed disadvantages and turn some of them into issues in the nix4vscode repo

I'm not sure how to use this with homemanager?

I'm far from a nix pro, but I wanted to add this to my (flaked) homemanager config so I can get all the nice benefits.

Unfortunately, I can't figure out how to do this.

My flake:

{
  description = "Home Manager configuration of Spott";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";

    home-manager = {
      url = "github:nix-community/home-manager/";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
    /*
       flake-utils = {
      url = "github:numtide/flake-utils";
    };
    */
  };

  outputs = {
    nixpkgs,
    home-manager,
    nix-vscode-extensions,
    ...
  }:
  let
    extensions = sys:
      nix-vscode-extensions.extensions.${sys}; # I can't figure out how to put this somewhere I can pass to the modules below
    overlays = sys: [
        (self: super: {
          python = super.python310;
        })
# is there some way I can pass this here, so I can use it with something like pkgs.nix-vscode-extensions?
      ];
      
    pkgs = sys:
      import nixpkgs {
        system = sys;
        config = {allowUnfree = true;};
        overlays = overlays sys;
      };
  in {
    packages = {
      aarch64-darwin.homeConfigurations = {
        "[email protected]" = home-manager.lib.homeManagerConfiguration {
          pkgs = pkgs "aarch64-darwin";
          modules = [
            ./normandy.nix
            ./common.nix # I want common.nix to have access to the extensions object, but I'm not sure how to do that.
            ./darwin-common.nix
            ./zsh/zsh.nix
          ];
        };
        "[email protected]" = home-manager.lib.homeManagerConfiguration {
          pkgs = pkgs "aarch64-darwin";
          modules = [
            ./endeavor.nix
            ./common.nix
            ./darwin-common.nix
            ./zsh/zsh.nix
          ];
        };
      };
      x86_64-linux.homeConfigurations = {
        "spott@devbox" = home-manager.lib.homeManagerConfiguration {
          pkgs = pkgs "x86_64-linux";
          modules = [
            ./devbox.nix
            ./common.nix
            ./zsh/zsh.nix
          ];
        };
      };
    };
  };
}

I'd appreciate any help, not sure if this is the right place to post this, if not, point me in the right direction.

Regression in HEAD

Reproduction (but not minimal):

nix develop github:anilanar/shells.nix/why-not-work

rust-analyzer failing with a bad hash

Not sure why, but rust-lang.rust-analyzer fails with a bad hash.

error: hash mismatch in fixed-output derivation '/nix/store/1magwzvshwqzxv4npv0m185jfxczmxqn-rust-analyzer-0.4.1381.zip.drv':
         specified: sha256-4+fS2fKhkYuPWfp1nrHwkNK7XU9kvs0iB/RtAzBH0sY=
            got:    sha256-z9pcu0rVMuwYJpJrI1l5YaT+TxlQo762j8RP+MGW2kQ=
error: 1 dependencies of derivation '/nix/store/klyv1hqbx1d4ym4qxidsl8j9352kv2fv-vscode-extension-rust-lang-rust-analyzer-0.4.1381.drv' failed to build

I would like to know why the hash is wrong in this repository, I don't know how the automation/crawler works, but is it even possible for the hash to change on the VSCode Marketplace?

restore overlay

I removed the overlay to let the flake into nixos-search (see #2 ). Some day, we can restore it.

  • Restore overlay
    • nix flake check should work

Support platform-specific extensions

As mentioned in #5, the API is non-deterministic without setting the target platform in a query parameter.

@twz123 proposed a way to collect a version - target platform mapping in #5 (comment).

We can add this information to our cache.

For each extension (name, publisher), for each platform, we need an object containing the fields lastUpdated, sha, version. We don't need a url because we can construct it on the fly in Nix.

Our .jsons will be 2+ times larger. I guess, we can for now provide extensions just for Nix-supported platforms.

What should be the mapping from Nix-supported platforms to Marketplace target platforms?

Nix supports:

  • Linux i686
  • Linux x86_64
  • Linux aarch64
  • macOS x86_64
  • macOS aarch64

VSCode Marketplace supports (excluding win):

  • universal
  • linux-x64
  • linux-arm64
  • linux-armhf
  • alpine-x64
  • alpine-arm64
  • darwin-x64
  • darwin-arm64
  • web

Open VSX supports

  • universal
  • linux-x64
  • linux-arm64
  • linux-armhf
  • alpine-x64
  • alpine-arm64
  • darwin-x64
  • darwin-arm64
  • web

Error 404 - regression from #21

I'm on revision fd916a94f287d9e1762f02df4f5984867c770b9f and I'm getting this error (cleaned up):

error: builder for '/nix/store/gxid8alyj5bkjdg3aniv0b44m9c2kq3x-shellcheck-0.32.5.zip.drv' failed with exit code 1;
       > trying https://open-vsx.org/api/timonwong/shellcheck/0.32.5/file/[email protected]
       > curl: (22) The requested URL returned error: 404
       > error: cannot download shellcheck-0.32.5.zip from any mirror

I've checked in devtools on open-vsx, and the url used there seems to be only slightly different (and works):
https://open-vsx.org/api/timonwong/shellcheck/linux-x64/0.32.5/file/[email protected]

The only difference is the linux-x64/ before the version in the path.

Workaround

back to the revision I was on before:

{
  inputs.nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions/fd916a94f287d9e1762f02df4f5984867c770b9f";
}
{extensions = with inputs.nix-vscode-extensions.extensions.${pkgs.system}; (
    with open-vsx; [
      timonwong.shellcheck
    ]
);}

Adding License Information + Other Metadata

Start of the discussion: https://github.com/orgs/nix-community/teams/nix-vscode-extensions

  • nvfetcher may produce incorrect .nix files because it uses simple string manipulation
    • Ex: invalid description attribute
      • Solution: no description attribute
  • nvfetcher doesn't extract metadata from the Microsoft marketplace extensions.
    • Decide if we need such metadata
    • If yes, try to fix (see NixOS/nixpkgs#161369)
      • We can extract the metadata from the manifest package.json inside the .vsix file.
      • The file can be extracted with unzip without decompressing the whole extension.

Is it Possible to use with Home-Manager?

I have tried a few ways to use nix-vscode-extensions with vscode module in home-manager. I have not had luck yet.

My current attempt looks something like this:

Flake.nix

inputs = {
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
};

outputs = inputs@{. . ., nix-vscode-extensions,...}:
let 
 open-vsx = nix-vscode-extensions.extensions.${system}.open-vsx;
in
{ 
. . .
    home-manager.nixosModules.home-manager
    {
      home-manager.useGlobalPkgs = true;
      home-manager.useUserPackages = true;
      home-manager.users.stephen = import ./${hostname}/home.nix;
      home-manager.extraSpecialArgs = {nix-vscode-extensions = open-vsx;}; # have tried a few different things here, this is just current attempt
      # also tried inherit inputs above
    }
. . .

Home.nix

  { config, pkgs, lib, open-vsx, ... }: <=== I have tried passing "inputs" here, and referencing it differently below.
  {
   programs.vscode = {
      enable = true;
      package = pkgs.vscodium;
      mutableExtensionsDir = false;
      # settings.json
      userSettings = {
     
      };
      extensions = with open-vsx; [ <===== TRYING TO USE INPUT HERE
        ...
        arrterian.nix-env-selector
        ...
      ];
    };

I am new to nix, and it would be helpful if I could get some direction or guidance please.

Thanks :)

Improve discarding strategy

We discard the extensions based on a single request. It may be better to discard them when they're unavailable multiple times.

What we do now:

  1. Each run, we get a list of extensions from API.
  2. We look at the extensions that aren't present in our json and fetch them.
  3. We discard from that json the extensions that aren't present in the API response.
  4. We add the new extensions into json.

How we can improve discarding:

    • Add a field unavailable_count to an extension info. It will record how many times the extension was unavailable.
    • If an extension reaches some threshold, it is discarded.
    • When it's present in a next API response, its counter will be set to 0.

How to use forVSCodeVersion with flake?

I have the following codes:

  extensions = with vscode-marketplace;[
    yzhang.markdown-all-in-one
    redhat.vscode-xml
    enkia.tokyo-night
    (forVSCodeVersion "1.79.2").waderyan.gitblame
];

But when I build, it always tell me:

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: attribute 'waderyan' missing

       at /nix/store/c6x6hp4afc244di9pkqxyfmrrl456fbn-source/config/vscode.nix:23:5:

           22|     enkia.tokyo-night
           23|     (forVSCodeVersion "1.79.2").waderyan.gitblame
             |     ^

Extension vadimcn.vscode-lldb fails with error "/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.35' not found"

The problem happens on a non-NixOS linux machine with a rather old distro.
I am able to run the extension by applying patchelf to the extension binaries as:

pathToZlib = pkgs.lib.makeLibraryPath [ pkgs.zlib ];

my-vscode-lldb  =  vscode-market.vadimcn.vscode-lldb.overrideAttrs (oldAttrs: {
    postInstall = ''
    cd "$out/$installPrefix"
    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ./adapter/codelldb
    patchelf --add-rpath "${pathToZlib}" ./lldb/lib/liblldb.so
    '';
});

Make a monolith fetcher

For now, we have two parts of the fetcher (high-level description):

  1. TypeScript scripts ask sites about extensions' info like name, publisher and latest upload timestamp. Then, the scripts generate a tmp.yaml with all this info.
  2. Haskell script
    1. reads this tmp.yaml and checks against another yaml - let it be cache.yaml - that contains additional info about extensions like calculated SHA. The script selects the info about extensions that are both in cache.yaml and tmp.yaml. These extensions are ready to be included into the updated version of cache.yaml. The extensions that are in tmp.yaml, but not in cache.yaml are fetched, and their SHA is calculated. Those extensions that were fetched successfully are combined with the ready extensions, they're all sorted and written into cache.yaml. As the vscode-marketplace usually returns very similar sets of extensions, it's cheap to update cache.yaml. The extensions that aren't in tmp.yaml but are in cache.yaml are not included into the updated cache.yaml. This is how we drop the old versions of extensions. The only interesting detail about the Haskell script is that this script spawns a limited number of threads that work on tmp.yaml and nix store prefetch-files so that we don't hit the request rate.
    2. After updating the cache.yaml, the script generates nix expressions from that file. Perhaps we should move this generation to Nix (TODO).

At a lower level, we work with files that are stored in data/. data/old/vscode-marketplace.yaml is like cache.yaml mentioned above.

As @spikespaz suggested (#9 (comment)), we can choose a language and write all our scripts in that language to improve maintainability.

  • It should be relatively easy to rewrite the TypeScript part in Haskell. In fact, I'd like to do it.
  • The thing that I dislike about the TS part is that it depends on the external deno site which may become inaccessible. @AmeerTaweel , would it be hard to rewrite the Haskell part in TypeScript without using the deno site? Would you like to do it?

What is `__filter` in flake.nix?

The top-level flake.nix uses a lot of dunder methods like __filter which look like the library functions, but aren't. I also don't find any definition for them in the file so I wonder how the whole flake even works. Can someone explain this shortly?

Multiple directories

The Netbeans extension (asf.apache-netbeans-java), possibly others, have multiple directories in the zipfile, and this causes the build to fail:

error: builder for '/nix/store/spmw2bry62skgchvpb6qkk8rf926r745-vscode-extension-asf-apache-netbeans-java-18.0.0.drv' failed with exit code 1;
       last 3 log lines:
       > unpacking sources
       > unpacking source archive /nix/store/rqpc0q8117cy5jcn8hhd84vk92006icd-apache-netbeans-java-18.0.0.zip
       > unpacker produced multiple directories

`streetsidesoftware.code-spell-checker` missing in VSX but present on website

I updated my flake sources today and got the following error:

error: attribute 'code-spell-checker' missing

       at /nix/store/pdwfrbvzvya04vwx1712fdqqpbnqfbdd-source/home-manager/common/vscode/extensions.nix:39:5:

           38|     shd101wyy.markdown-preview-enhanced
           39|     streetsidesoftware.code-spell-checker
             |     ^
           40|     tamasfe.even-better-toml

I looked through the commit history and noticed that the extension has been removed in the update 12 hours ago (fd8cee8#diff-db06c147305f13309bc4ca7b66da962d0b9e166ae2ed780c000531d2d78841ebL1974)

I considered that it might have been removed from VSX, but looking at the site, it seems to still be available https://open-vsx.org/extension/streetsidesoftware/code-spell-checker (though the site version is 2.17.1, while the one in the repo was 2.16.0)

Is there a reason for the extension disappearing or could this be caused by a bug in the automatic generation of the extension itself?

'oracle.oracledevtools' failing to build

Output of home-manager switch:

warning: Git tree '/home/kurisu/NixOS' is dirty
error: builder for '/nix/store/bccw3jk0hkg0g6v3qjg8cx536v9ga09w-vscode-extension-oracle-oracledevtools-21.8.0.drv' failed with exit code 1;
       last 3 log lines:
       > unpacking sources
       > unpacking source archive /nix/store/javnnm6lvbkjpn87ciipdlvr796ci4d7-oracledevtools-21.8.0.zip
       > unpacker produced multiple directories
       For full logs, run 'nix log /nix/store/bccw3jk0hkg0g6v3qjg8cx536v9ga09w-vscode-extension-oracle-oracledevtools-21.8.0.drv'.
error: 1 dependencies of derivation '/nix/store/9qb7lgra7pirly6mpw6n39dyfy5msqbp-hm_.vscodeextensions.extensionsimmutable.json.drv' failed to build
error: 1 dependencies of derivation '/nix/store/8mq63gvz8n1qi4542bkwqp2qak24q1z7-home-manager-files.drv' failed to build
error: 1 dependencies of derivation '/nix/store/y157df1sfnnn3z8flgiadc1qzi2621dn-home-manager-generation.drv' failed to build

Here my shortened flake.nix:

inputs.nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";

outputs = {...}@inputs {
  overlays = [ inputs.nix-vscode-extensions.overlays.default ];
};

pkgs = import nixpkgs {
  inherit overlays;
};

And here my shortened home.nix:

programs.vscode = {
  enable = true;
  extensions = with pkgs-stable.vscode-marketplace; [
    oracle.oracledevtools # <--- This does not work
    catppuccin.catppuccin-vsc # <--- This works
  ];
};

I'm really not sure where to even start looking so if anyone got an idea.. that would be great :)
If you need any additional information just ask me.

Improve documentation?

I'm trying to figure out how I would go about integrating this into my home-manager configuration and the documentation/examples given in the readme doesn't seem to explain it.

Ideally I'd like to be able to use this with programs.vscode.extensions in home-manager, (I do have programs.vscode.package set to pkgs.vscodium).

Introduce stable branch

I propose that we track problematic extensions (looking at rust-analyzer) and only push these specific extensions to the stable branch when they have been checked after an automatic update.

specified: sha256-ttLGbPikx3khbjRiubNjlkEF5uX/T3NkpdpSCbELEKw=
got:       sha256-VHBxuVz7Dul/yIRnlhep3sKx9qCOOexVjLciBB1c23Y=

vscode version compatablity fix

  1. include a version of package compatible with the version in nixos-unstable, nixos-stable, latest
    at very least make sure to have version that works with nix-vscode-extensions.inputs.nixpkgs
  2. expose an up to date vscode / codium
  3. tag daily commit with newest version of vscode / highest min engine version.
let
  pkgs = import <nixpkgs> {};
  inherit (pkgs) lib writeTextFile;
  inherit (lib) catAttrs pipe importJSON;
  inherit (lib.lists) unique naturalSort last;

  file = ./vscode-marketplace-latest.json;
  
  text = pipe file [
    importJSON
    (catAttrs "engineVersion")
    unique
    (map (lib.strings.removePrefix "^"))
    unique
    naturalSort
    last
  ];
  output = writeTextFile { name = "engineVersion.txt"; text = text; };
in
output

gets the highest engineVersion

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.