nix-community/dream2nix

pip: do not know how to unpack source archive xxxx.whl

Opened this issue · 1 comments

raboof commented

I tried packaging a pip module: https://codeberg.org/raboof/nix-vulnerablecode

... but it fails to unpack the .whl:

      > Using setuptoolsShellHook
       > Sourcing pypa-install-hook
       > Using pypaInstallPhase
       > Sourcing python-imports-check-hook.sh
       > Using pythonImportsCheckPhase
       > Sourcing python-namespaces-hook
       > Sourcing python-catch-conflicts-hook.sh
       > unpacking sources
       > unpacking source archive /nix/store/01nnkk77w2vi7jv9g3yjlmrphyc40wdk-vulnerablecode-33.6.3-py3-none-any.whl
       > do not know how to unpack source archive /nix/store/01nnkk77w2vi7jv9g3yjlmrphyc40wdk-vulnerablecode-33.6.3-py3-none-any.whl

Is it incorrect that this is pointing to a whl, or that it fails to unzip the whl, or is the way this software is packaged not supported by dream2nix?

phaer commented

Is it incorrect that this is pointing to a whl, or that it fails to unzip the whl, or is the way this software is packaged not supported by dream2nix?

This should be supported. For some reasons, your flake end's up with buildPythonPackage.format = "setuptools";, while it works with

  buildPythonPackage.format = "wheel";

This should be set as a default in

if l.hasSuffix ".whl" cfg.mkDerivation.src
if mkDerivation.src ends with '.whl', which packages.x86_64-linux.default.config.mkDerivation.src does according to my nix repl.