Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv, buildPythonPackage, fetchPypi, dns, pycountry, nose }: 2 3buildPythonPackage rec { 4 pname = "FormEncode"; 5 version = "1.3.1"; 6 name = "${pname}-${version}"; 7 8 src = fetchPypi { 9 inherit pname version; 10 sha256 = "1xm77h2mds2prlaz0z4nzkx13g61rx5c2v3vpgjq9d5ij8bzb8md"; 11 }; 12 13 buildInputs = [ dns pycountry nose ]; 14 15 patchPhase = '' 16 # dnspython3 has been superseded, see its PyPI page 17 substituteInPlace setup.py --replace dnspython3 dnspython 18 ''; 19 20 preCheck = '' 21 # two tests require dns resolving 22 sed -i 's/test_cyrillic_email/noop/' formencode/tests/test_email.py 23 sed -i 's/test_unicode_ascii_subgroup/noop/' formencode/tests/test_email.py 24 ''; 25 26 meta = with stdenv.lib; { 27 description = "FormEncode validates and converts nested structures"; 28 homepage = http://formencode.org; 29 license = licenses.mit; 30 }; 31}