nix-community / pypi2nix

Abandoned! Generate Nix expressions for Python packages
194 stars 47 forks source link

Attribute patch phase missing in requirements.nix #401

Closed ThoenigAdrian closed 4 years ago

ThoenigAdrian commented 4 years ago

Hi I just tried pypi2nix and wanted to install requests==1.0.0

pypi2nix -e requests==1.0.0 --python-version 2.7

Which succeeded with "Nix expressions generated successfully"

After that I executed

nix build -f requirements.nix packages

But it fails with :

error: attribute 'patchPhase' missing, at /home/jane/requirements.nix:25:24
(use '--show-trace' to show detailed location information)
truh commented 4 years ago

I'm experiencing the same issue after upgrading to NixOs 19.09.

seppeljordan commented 4 years ago

Hi, which version of pypi2nix are you using?

truh commented 4 years ago

It's 1.8.1 from nixpkgs 19.09, I admittedly didn't test the newest version or unstable branch after I found this issue.

ThoenigAdrian commented 4 years ago

for me the same version and channel as @truh

seppeljordan commented 4 years ago

Hi,

I am sorry to say that I currently lack the capacity to maintain old versions of pypi2nix. I know that this sucks since 1.8.1 is the version release on current nixos-stable, but that's how it is.

ThoenigAdrian commented 4 years ago

Hi,

I understand. Can you provide us with a workaround ? I see there is a 2.0 version released here on github, is there a way to specify this on /etc/nixos/configuration.nix ?

truh commented 4 years ago

Have you tried nix-env -if https://github.com/nix-community/pypi2nix/tarball/master from the readme?

ThoenigAdrian commented 4 years ago

@truh thx this seems to work.

Though declarative installation fails for me , but I might open another issue for that