nix-community / pypi2nix

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

Does not create executables? #432

Open turion opened 4 years ago

turion commented 4 years ago

I tried:

$ pypi2nix -e csvdiff
$ nix-shell requirements.nix -A interpreter
$ csvdiff
csvdiff: command not found
seppeljordan commented 4 years ago

Can you please provide the output of the pypi2nix command?

turion commented 4 years ago
$ pypi2nix -e csvdiff
INFO: pypi2nix v2.0.4 running ...
INFO: Downloading wheels and creating wheelhouse ...
INFO: Downloading runtime requirements
WARNING: You are using pip version 20.0.dev0; however, version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
WARNING: You are using pip version 20.0.dev0; however, version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
WARNING: You are using pip version 20.0.dev0; however, version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
INFO: Build wheels of setup and runtime requirements
INFO: Extracting metadata from pypi.python.org ...
INFO: -- sources ---------------------------------------------------------------
INFO: --------------------------------------------------------------------------
INFO: Generating Nix expressions ...
INFO: |-> writing /home/turion/python/requirements_override.nix
INFO: 
INFO: Nix expressions generated successfully.
INFO: 
INFO: To start development run:
INFO:     nix-shell requirements.nix -A interpreter
INFO: 
INFO: More information you can find at
INFO:     https://github.com/nix-community/pypi2nix

Or did you mean the generated files?

turion commented 4 years ago

Note that there is a tiny chance that it's an upstream error and csvdiff is broken (in that it doesn't contain a proper executable). I haven't been able to rule that out yet.

turion commented 4 years ago

I now understand that the executable can be found in ./env/bin/. I expected it to be in the path. So if that's intended behaviour, we can close.

domenkozar commented 4 years ago

Easiest thing I've found is to do PATH=$PATH:$(nix-build requirements.nix)/bin nix-shell requirements.txt