mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-20 04:02:40 +03: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`.
38 lines
743 B
Nix
38 lines
743 B
Nix
{ buildPythonPackage
|
|
, fetchPypi
|
|
, pythonOlder
|
|
, stdenv
|
|
, setuptools_scm
|
|
, pytest
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "typeguard";
|
|
version = "2.1.4";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "40b22d18d2215b76b3ddda2564acfbddfa6e702968637fbd969187c2a6fb99da";
|
|
};
|
|
|
|
buildInputs = [ setuptools_scm ];
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.cfg --replace " --cov" ""
|
|
'';
|
|
|
|
checkInputs = [ pytest ];
|
|
|
|
checkPhase = ''
|
|
py.test .
|
|
'';
|
|
|
|
disabled = pythonOlder "3.3";
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "This library provides run-time type checking for functions defined with argument type annotations";
|
|
homepage = https://github.com/agronholm/typeguard;
|
|
license = licenses.mit;
|
|
};
|
|
}
|