nix-community / nix-vscode-extensions

Nix expressions for VSCode and OpenVSX extensions [maintainers: @deemp, @AmeerTaweel]
MIT License
206 stars 11 forks source link

How to use forVSCodeVersion with flake? #32

Closed cathaysia closed 1 year ago

cathaysia commented 1 year ago

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
             |     ^
deemp commented 1 year ago

@cathaysia , please, see the README. I added an example of usage with forVSCodeVersion.

cathaysia commented 1 year ago

it seems ForVSCodeVersion lack many things?

nix-repl> (pkgs.forVSCodeVersion "1.79.2").vscode-marketplace.ms-ceintl
{ vscode-language-pack-bg = «derivation /nix/store/v6bk8baz9jqdyf31js45bdxylgd2s2kk-vscode-extension-ms-ceintl-vscode-language-pack-bg-1.48.3.drv»; vscode-language-pack-hu = «derivation /nix/store/kr86pd737k4fnj7cr2s60xfr2ps5dxsp-vscode-extension-ms-ceintl-vscode-language-pack-hu-1.48.3.drv»; }
deemp commented 1 year ago

It lacks extensions incompatible with a given version of VS Code. See https://code.visualstudio.com/api/working-with-extensions/publishing-extension#visual-studio-code-compatibility

cathaysia commented 1 year ago

Ok, it looks like I misunderstood what this function does. It filters out incompatible plugins instead of picking the last compatible one. Thanks


From: Danila Danko @.> Sent: Sunday, July 16, 2023 1:08:15 PM To: nix-community/nix-vscode-extensions @.> Cc: DragonBillow @.>; Mention @.> Subject: Re: [nix-community/nix-vscode-extensions] How to use forVSCodeVersion with flake? (Issue #32)

It lacks extensions incompatible with a given version of VS Code. See https://code.visualstudio.com/api/working-with-extensions/publishing-extension#visual-studio-code-compatibility

― Reply to this email directly, view it on GitHubhttps://github.com/nix-community/nix-vscode-extensions/issues/32#issuecomment-1636982986, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKBJ6ANV37FRIIYHKSRRO5LXQNZL7ANCNFSM6AAAAAA2KQNFPU. You are receiving this because you were mentioned.Message ID: @.***>