nix-community/nix-vscode-extensions
概要
VS Code MarketplaceとOpen VSXの拡張機能向けNix式 [メンテナー=@deemp, @ameertaweel]
開発ツール計測したスター増加
- 24時間
- 0
- 7日間
- -2
- 15日間
- 0
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルNix expressions for VS Code Extensions
This flake provides Nix expressions for the latest pre-release and release versions of the majority of available extensions from the VS Code Marketplace and the Open VSX Registry. A GitHub Action updates these extensions daily.
As of October 2, 2025, the nixpkgs repository contains 456 VS Code extensions. This is a small fraction of the nearly 80,000 extensions available on the VS Code Marketplace. In addition, many of the extensions in nixpkgs are outdated.
Check nix4vscode (and contribute!) if you need not only the latest extension versions.
Don't abuse this flake
We have a permission from MS to use a crawler on their API (see the discussion).
Don't abuse this flake!
Limitations
Supported platforms
x86_64-linuxaarch64-linuxaarch64-darwin
Also see:
Prerequisites
Read NixOS wiki
Read the VS Code page on the NixOS wiki.
(Optional) Enable flakes and experimental commands
- Read about Nix flakes.
- Set them up.
- Enable the
nix-commandoption to usenix repland other experimental commands (see Start REPL, Explore). This option should already be enabled if you followed the setup instructions for flakes.
(Optional) Allow unfree packages
See Unfree extensions.
(Optional) Enter the repository directory
Clone this repository and enter its directory.
git clone https://github.com/nix-community/nix-vscode-extensions
cd nix-vscode-extensions
(Optional) Start REPL
See nix repl.
nix repl
History
You can search for an extension in the repository history:
- Get commits containing the extension:
git log -S '"copilot"' --oneline data/cache/vscode-marketplace-latest.json - Select a commit, e.g.:
0910d1e - Search in that commit:
git grep '"copilot"' 0910d1e -- data/cache/vscode-marketplace-latest.json
Example
The ./nix/vscode-with-extensions.nix provides an example of vscode-with-extensions.
This package is VS Code with a couple of extensions.
Run VS Code and list installed extensions.
List extensions with flakes
nix run github:nix-community/nix-vscode-extensions/fd5c5549692ff4d2dbee1ab7eea19adc2f97baeb#default -- --list-extensions
Template
This repository has a flake ./template/flake.nix.
This template provides a VSCodium with a couple of extensions.
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 .Run
VSCodium.nix run .# .Alternatively, start a devShell and run
VSCodium. AshellHookwill print extensions available in theVSCodium.nix develop .#vscodium codium .
In case of problems see Troubleshooting.
Overlay
See Overlays.
If you use NixOS, Home Manager, or similar:
If you use flakes, add
nix-vscode-extensionsto your flake inputs (see example).inputs.nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions/fd5c5549692ff4d2dbee1ab7eea19adc2f97baeb"; outputs = inputs@{ nix-vscode-extensions, ... }: ...If you don't use flakes, import the
nix-vscode-extensionsrepository.let nix-vscode-extensions = import ( builtins.fetchGit { url = "https://github.com/nix-community/nix-vscode-extensions"; ref = "refs/heads/master"; rev = "fd5c5549692ff4d2dbee1ab7eea19adc2f97baeb"; } ); inAdd the
nix-vscode-extensions.overlays.defaulttonixpkgsoverlays (see Getextensionsvia the overlay, example).(Optional) Allow unfree packages (see Unfree extensions).
Use
pkgs.nix-vscode-extensions.vscode-marketplace,pkgs.nix-vscode-extensions.open-vsxand others (see Theextensionsattrset, Explore, example).
[!NOTE] See With-expressions.
In
with A; with B;, the attributes ofBshadow the attributes ofA.Keep in mind this property of
withwhen writingwith vscode-marketplace; with vscode-marketplace-release;.
Get extensions
Prerequisites:
Get nixpkgs
Get nixpkgs with flakes
nix-repl> nixpkgs = builtins.getFlake github:NixOS/nixpkgs/0c2094806c9e542f31785ef3569ab9e900e3ce9c
Get nixpkgs without flakes
nix-repl> nixpkgs = (import (builtins.fetchGit {
url = "https://github.com/NixOS/nixpkgs";
ref = "refs/heads/master";
rev = "0c2094806c9e542f31785ef3569ab9e900e3ce9c";
}))
Get nix-vscode-extensions
Get nix-vscode-extensions with flakes
nix-repl> nix-vscode-extensions = builtins.getFlake github:nix-community/nix-vscode-extensions/fd5c5549692ff4d2dbee1ab7eea19adc2f97baeb
Get nix-vscode-extensions without flakes
nix-repl> nix-vscode-extensions = (import (builtins.fetchGit {
url = "https://github.com/nix-community/nix-vscode-extensions";
ref = "refs/heads/master";
rev = "fd5c5549692ff4d2dbee1ab7eea19adc2f97baeb";
}))
Get extensions attrset
Get system
nix-repl> system = builtins.currentSystem
[!TIP]
systemcan be provided byflake-utilsorflake-parts.
Get extensions via the overlay
See Overlay.
nix-repl> extensions = (import nixpkgs { inherit system; config.allowUnfree = true; overlays = [ nix-vscode-extensions.overlays.default ]; }).nix-vscode-extensions
Get extensions from nix-vscode-extensions
The nix-vscode-extensions.extensions attribute is constructed by extending nixpkgs from the nix-vscode-extensions flake inputs with the overlay.
nix-repl> extensions = nix-vscode-extensions.extensions.${system}
Extensions
Platforms
We provide attrsets that contain both universal and platform-specific extensions.
We use a reasonable mapping between the sites target platforms and Nix-supported platforms. See:
- Supported platforms
nix/systemPlatform.nix- [
numberToPlatform] innix/overlay.nix - Discussion on the platform mapping
The extensions attrset
[!NOTE] Here,
*stands for a sequence of zero or more characters.
The Get extensions section explains how to get the extensions attrset.
This attrset contains several attributes described in the sections Extension attrsets and Functions that produce extension attrsets.
Extension attrsets
For each extension, the cache files contain at most one version for each combination of these properties:
- whether a version is pre-release or release;
- whether a version is universal or platform-specific.
We used the following method to choose a version:
- We created several attrsets of extensions with constraints on possible combinations of property values.
- We named attrsets to show additional constraints. E.g.,
vscode-marketplace*attrsets contain only extensions from theVS Code Marketplace. - In each attrset, for each extension whose versions could be in that attrset, we provided the SemVer-highest version of that extension. So, a pre-release version older than a release version is not chosen.
- When several versions are equally high, we chose the one whose combination of property values has the highest priority.
The next sections show permitted property combinations and their priorities in corresponding attrsets (1 - the highest priority).
vscode-marketplace and open-vsx
- pre-release platform-specific
- pre-release universal
- release platform-specific
- release universal
vscode-marketplace-release and open-vsx-release
- release platform-specific
- release universal
vscode-marketplace-universal and open-vsx-universal
- pre-release universal
- release universal
vscode-marketplace-release-universal and open-vsx-release-universal
- release universal
Functions that produce extension attrsets
forVSCodeVersion
forVSCodeVersion version produces an attrset similar to extensions (see The extensions attrset) but containing only the extensions compatible with the version version of VS Code (see Versions compatible with a given version of VS Code).
You should replace version with your VS Code or VSCodium version.
usingFixesFrom
usingFixesFrom nixpkgsWithFixes produces an attrset where particular extensions have fixes specified in the supplied nixpkgsWithFixes (see mkExtensionNixpkgs in mkExtension.nix, Versions with fixes from particular nixpkgs, Use fixes from nixpkgs).
- The supplied
nixpkgsWithFixescan be any version ofnixpkgs(see Getnixpkgs). - The supplied
nixpkgsWithFixesis used only to look up the fixes in its source code and is independent of thenixpkgsthat you apply the overlay to.
The top-level vscode-marketplace* and open-vsx* attributes are constructed using fixes from nixpkgs that you apply the overlay to (if you get extensions via the overlay) or nixpkgs from the nix-vscode-extensions repository (if you get extensions from nix-vscode-extensions).
Extension identifiers
- Extension publishers and names are lowercased only in Nix.
- They're not lowercased in
.jsoncache files.
- They're not lowercased in
- Access an extension in the format
<attrset>.<publisher>.<name>, where<attrset>isvscode-marketplace,open-vsx, etc. (see Explore). - If an extension publisher or name aren't valid Nix identifiers, quote them like
<attrset>."4"."2".
Missing extensions
- Some previously available extensions may be unavailable in newer versions of this flake.
- An extension is missing if it doesn't appear during a particular workflow run in a
VS Code Marketplaceor anOpen VSXresponse about the full set of available extensions (see discussion). - We let missing extensions remain in cache files and plan to purge missing extensions periodically (see #139).
- An extension is missing if it doesn't appear during a particular workflow run in a
Extension packs
- We don't automatically handle extension packs. You should look up extensions in a pack and explicitly write all necessary extensions.
Unfree extensions
- We use derivations and code from
nixpkgsfor some extensions (see Versions with fixes from particularnixpkgs). - Unfree extensions from
nixpkgsstay unfree here (see Unfree software, Special extensions). - If you want to use unfree extensions, try one of the following ways:
Set
config.allowUnfree = truewhen constructingpkgs.# If you use flakes, `system` can be provided # by `flake-utils` or `flake-parts`. system = builtins.currentSystem; pkgs = import nixpkgs { inherit system; config.allowUnfree = true; overlays = [ overlays.default ]; }Override the license of a particular extension.
let resetLicense = drv: drv.overrideAttrs (prev: { meta = prev.meta // { license = [ ]; }; }); in resetLicense <publisher>.<name>
Explore
Prerequisites:
[!NOTE] Press the
Tabbutton (denoted as<TAB>below) to see attrset attributes.
Explore extensions
nix-repl> extensions.<TAB>
extensions.forVSCodeVersion extensions.vscode-marketplace
extensions.open-vsx extensions.vscode-marketplace-release
extensions.open-vsx-release extensions.vscode-marketplace-release-universal
extensions.open-vsx-release-universal extensions.vscode-marketplace-universal
extensions.open-vsx-universal
extensions.usingFixesFrom
Explore vscode-marketplace and open-vsx
See vscode-marketplace and open-vsx.
nix-repl> extensions.vscode-marketplace.rust-lang.rust-analyzer.version
"0.4.2638"
nix-repl> extensions.vscode-marketplace.vadimcn.vscode-lldb.version
"1.11.0"
Explore vscode-marketplace-release and open-vsx-release
See vscode-marketplace-release and open-vsx-release.
nix-repl> extensions.vscode-marketplace-release.rust-lang.rust-analyzer.version
"0.3.2593"
nix-repl> extensions.vscode-marketplace-release.vadimcn.vscode-lldb.version
"1.11.0"
Explore vscode-marketplace-universal and open-vsx-universal
See vscode-marketplace-universal and open-vsx-universal.
nix-repl> extensions.vscode-marketplace-universal.rust-lang.rust-analyzer.version
"0.4.1067"
nix-repl> extensions.vscode-marketplace-universal.vadimcn.vscode-lldb.version
"1.11.6"
Explore vscode-marketplace-release-universal and open-vsx-release-universal
See vscode-marketplace-release-universal and open-vsx-release-universal.
nix-repl> extensions.vscode-marketplace-release-universal.vadimcn.vscode-lldb.version
"1.11.6"
Versions compatible with a given version of VS Code
See forVSCodeVersion.
nix-repl> extensionsCompatible = extensions.forVSCodeVersion "1.78.2"
The extensionsCompatible attrset contains some of the the extensions attrset attributes.
Versions with fixes from particular nixpkgs
Some extensions require non-trivial fixes (example).
These fixes may be available in a particular version of nixpkgs.
These fixes are read from the source code of that nixpkgs version (see mkExtensionNixpkgs in mkExtension.nix).
Use fixes from nixpkgs
In this case, we use the same version of nixpkgs that was used to get extensions.
You can use any other version instead.
nix-repl> extensionsFixed = extensions.usingFixesFrom nixpkgs
The extensionsFixed attrset contains some of the the extensions attrset attributes.
Removed extensions
Some extensions are unavailable or don't work on particular platforms.
These extensions are disabled via ./nix/removed.nix.
Modify
Override an extension
Most of the extensions have the override attribute.
This attribute allows you to override the arguments passed to buildVscodeMarketplaceExtension.
Also see:
Example:
jj-view.jj-viewextension invscode-with-extensions.nix
Config
See:
Cache
Cache files
See:
Cache object example
{
"p": "haskell",
"n": "haskell",
"r": 0,
"P": 0,
"v": "2.7.0",
"e": "^1.102.0",
"m": 2,
"h": "sha256-rkQw8A2irw1AcUCnEffG5BNPuQQF9dfjiRHHXPdK/zU="
}
Intermediate Nix representation
| JSON key | Nix attrname | Description |
|---|---|---|
p |
publisher |
extension publisher |
n |
name |
extension name |
r |
isRelease |
whether it's a release extension version |
P |
platform |
extension platform |
v |
version |
extension version |
e |
engineVersion |
engine version (minimal compatible VSCode version) |
h |
hash |
extension .vsix hash obtained via nix store prefetch-file |
Values
In the ./nix/overlay.nix:
numberToPlatformconvertsPtoplatform;numberToIsReleaseconvertsrtoisRelease.
Nix
mkExtension.nix
./nix/mkExtension.nix provides a function to build an extension from an extension config.
Contribute
Issues
Resolve issues.
Pull requests
Make pull requests.
README
- Fix links.
- Write new sections.
- Update commit hashes used in examples if they're too old.
- Enhance the text.
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 build such extension in the extensions directory (see extensions/default.nix).
Optionally, create and link issues explaining chosen functions.
Each extension, including Extra extensions, is built via one of the functions in mkExtension.nix.
These functions don't modify the license of (unfree) extensions from nixpkgs.
Build problems
Haskell script
See the ./haskell/README.md.
Troubleshooting
- If
Nix-providedVSCodiumdoesn't pick up the extensions:- Close other instances of
Nix-providedVSCodiumand startVSCodiumagain. - Try to reboot your computer and start
VSCodiumagain.
- Close other instances of
関連プロジェクトを探す
読み込み中…