mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-16 02:33:25 +00:00
ced21f5e1a
The `buildPython*` function computes name from `pname` and `version`. This change removes `name` attribute from all expressions in `pkgs/development/python-modules`. While at it, some other minor changes were made as well, such as replacing `fetchurl` calls with `fetchPypi`.
31 lines
842 B
Nix
31 lines
842 B
Nix
{ stdenv, buildPythonPackage, fetchPypi, dnspython, pycountry, nose }:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "FormEncode";
|
|
version = "1.3.1";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "1xm77h2mds2prlaz0z4nzkx13g61rx5c2v3vpgjq9d5ij8bzb8md";
|
|
};
|
|
|
|
buildInputs = [ dnspython pycountry nose ];
|
|
|
|
patchPhase = ''
|
|
# dnspython3 has been superseded, see its PyPI page
|
|
substituteInPlace setup.py --replace dnspython3 dnspython
|
|
'';
|
|
|
|
preCheck = ''
|
|
# two tests require dns resolving
|
|
sed -i 's/test_cyrillic_email/noop/' formencode/tests/test_email.py
|
|
sed -i 's/test_unicode_ascii_subgroup/noop/' formencode/tests/test_email.py
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "FormEncode validates and converts nested structures";
|
|
homepage = http://formencode.org;
|
|
license = licenses.mit;
|
|
};
|
|
}
|