Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extensionFromVscodeMarketplace: Fails on weird gzipped-zip VSIX #340253

Open
sliedes opened this issue Sep 7, 2024 · 0 comments
Open

extensionFromVscodeMarketplace: Fails on weird gzipped-zip VSIX #340253

sliedes opened this issue Sep 7, 2024 · 0 comments
Labels
0.kind: bug Something is broken

Comments

@sliedes
Copy link

sliedes commented Sep 7, 2024

Describe the bug

There is at least one extension in the Vscode Marketplace that pkgs.vscode-utils.extensionFromVscodeMarketplace fails to build:

      (pkgs.vscode-utils.extensionFromVscodeMarketplace {
        name = "overtype";
        publisher = "drmerfy";
        version = "0.5.0";
        hash = "sha256-aiaQu818XZDtWCxFof/h9l1UqxEKgiM+FYPuVDr9bgY=";
      })
error: builder for '/nix/store/1m9jhwcfk6690nbhiizdmacjhiy1w8il-vscode-extension-drmerfy-overtype-0.5.0.drv' failed with exit code 1;
       last 10 log lines:
       > Running phase: unpackPhase
       > unpacking source archive /nix/store/4hm4kz2a2zkfin5za9drrsq283ii93k5-drmerfy-overtype.zip
       > [/nix/store/4hm4kz2a2zkfin5za9drrsq283ii93k5-drmerfy-overtype.zip]
       >   End-of-central-directory signature not found.  Either this file is not
       >   a zipfile, or it constitutes one disk of a multi-part archive.  In the
       >   latter case the central directory and zipfile comment will be found on
       >   the last disk(s) of this archive.
       > unzip:  cannot find zipfile directory in one of /nix/store/4hm4kz2a2zkfin5za9drrsq283ii93k5-drmerfy-overtype.zip or
       >         /nix/store/4hm4kz2a2zkfin5za9drrsq283ii93k5-drmerfy-overtype.zip.zip, and cannot find /nix/store/4hm4kz2a2zkfin5za9drrsq283ii93k5-drmerfy-overtype.zip.ZIP, period.
       > do not know how to unpack source archive /nix/store/4hm4kz2a2zkfin5za9drrsq283ii93k5-drmerfy-overtype.zip
       For full logs, run 'nix log /nix/store/1m9jhwcfk6690nbhiizdmacjhiy1w8il-vscode-extension-drmerfy-overtype-0.5.0.drv'.

Inspecting the file in the store, it seems to be a gzipped zip, i.e. I assume doing an extra gunzip on it would fix this.

I don't know how worth fixing this is, or how common such extensions are. It seems to work when installing directly in vscode, and to cause all kinds of weird issues all over the Nix solutions for installing extensions (e.g. nix-community/nix-vscode-extensions#78).

Steps To Reproduce

Try to build the package as shown in the code above.

Expected behavior

The result is a built extension in the nix store.

Notify maintainers

vscode maintainers (since I had trouble finding more specific names for vscode-utils); I assume you at least know who should be pinged: @eadwu @Synthetica @bobby285271 @JohnRTitor

Metadata

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.47, NixOS, 24.11 (Vicuna), 24.11.20240904.ad416d0`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.5`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/store/6inj491lsap4ia7mmvn2gbh53jb27zq0-source`

Add a 👍 reaction to issues you find important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

1 participant