nixpkgs/pkgs/development/python-modules/ics/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
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
2021-01-11 10:38:22 +01:00

40 lines
1.1 KiB
Nix

{ lib, stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder
, tatsu, arrow
, pytestCheckHook, pytest-flakes
}:
buildPythonPackage rec {
pname = "ics";
version = "0.7";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "C4ptainCrunch";
repo = "ics.py";
rev = "v${version}";
sha256 = "0rrdc9rcxc3ys6rml81b8m8qdlisk78a34bdib0wy65hlkmyyykn";
};
propagatedBuildInputs = [ tatsu arrow ];
postPatch = ''
substituteInPlace requirements.txt \
--replace "arrow>=0.11,<0.15" "arrow"
substituteInPlace setup.cfg --replace "--pep8" ""
'';
checkInputs = [ pytestCheckHook pytest-flakes ];
meta = with lib; {
description = "Pythonic and easy iCalendar library (RFC 5545)";
longDescription = ''
Ics.py is a pythonic and easy iCalendar library. Its goals are to read and
write ics data in a developer friendly way.
'';
homepage = "http://icspy.readthedocs.org/en/stable/";
changelog = "https://github.com/C4ptainCrunch/ics.py/releases/tag/v${version}";
license = licenses.asl20;
maintainers = with maintainers; [ primeos ];
};
}