4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
54 lines
893 B
Nix
54 lines
893 B
Nix
{ lib, stdenv
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, dateutil
|
|
, sigtools
|
|
, six
|
|
, attrs
|
|
, od
|
|
, docutils
|
|
, repeated_test
|
|
, pygments
|
|
, unittest2
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "clize";
|
|
version = "4.1.1";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "f54dedcf6fea90a3e75c30cb65e0ab1e832760121f393b8d68edd711dbaf7187";
|
|
};
|
|
|
|
# Remove overly restrictive version constraints
|
|
postPatch = ''
|
|
substituteInPlace setup.py --replace "attrs>=19.1.0,<20" "attrs"
|
|
'';
|
|
|
|
checkInputs = [
|
|
pytestCheckHook
|
|
dateutil
|
|
pygments
|
|
repeated_test
|
|
unittest2
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
attrs
|
|
docutils
|
|
od
|
|
sigtools
|
|
six
|
|
];
|
|
|
|
pythonImportsCheck = [ "clize" ];
|
|
|
|
meta = with lib; {
|
|
description = "Command-line argument parsing for Python";
|
|
homepage = "https://github.com/epsy/clize";
|
|
license = licenses.mit;
|
|
};
|
|
}
|