2018-10-27 15:28:06 +02:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, click
|
|
|
|
, configobj
|
|
|
|
, contexter
|
|
|
|
, jinja2
|
|
|
|
, pytest
|
2019-10-22 13:32:56 +02:00
|
|
|
, pip
|
2018-10-27 15:28:06 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pip2nix";
|
|
|
|
version = "0.7.0";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "ec9a71e09ac7f43cc7b6c9d386384eb7b5c331bf6ea0e72ca559d87979397a95";
|
|
|
|
};
|
|
|
|
|
2019-10-22 13:32:56 +02:00
|
|
|
propagatedBuildInputs = [ click configobj contexter pip jinja2 pytest ];
|
2018-10-27 15:28:06 +02:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i "s/'pip>=8,<10'/'pip'/" setup.py
|
|
|
|
sed -i "s/pip<10,>=8/pip/" ${pname}.egg-info/requires.txt
|
|
|
|
'';
|
|
|
|
|
|
|
|
# tests not included with pypi release
|
|
|
|
doCheck = false;
|
|
|
|
|
2019-10-22 13:32:56 +02:00
|
|
|
# Requires an old pip version
|
|
|
|
broken = true;
|
|
|
|
|
2018-10-27 15:28:06 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Generate Nix expressions for Python packages";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/johbo/pip2nix";
|
2018-10-27 15:28:06 +02:00
|
|
|
license = licenses.gpl3;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|