Skip to content
This repository has been archived by the owner on Jun 12, 2020. It is now read-only.

proger/python2nix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python2nix

Put a PyPI package name in, get a Nix expression out to add to nixpkgs or your private build scripts.

Quick start

  • Choose your favorite package from PyPI (like https://pypi.python.org/pypi/thumbor)
  • Feed its name to python2nix: python -mpython2nix thumbor
  • Use code from stdout as the base for Nix expression (it may need manual tweaks).
nix-shell -p pythonPackages.virtualenv
virtualenv env
env/bin/pip install -r pip.requirements
mkdir -p env/build
env/bin/python -mpython2nix thumbor | tee thumbor.nix

Known issues

  • You will need to convert md5 to sha256 manually.
  • Tested only with pip==1.5.6.
  • May ignore lots of the metadata (e.g. doesn't handle tests_require).

Contributors

You may also like

  • pypi2nix -- seems to just work these days
  • @tailhook's reqtxt2nix which lets you produce build environments (put your requirements.txt in, get a myEnvFun out)

About

Put a PyPI package name in, get a Nix expression out.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages