nixpkgs-suyu/pkgs/development/python-modules/vdirsyncer/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

67 lines
1.4 KiB
Nix

{ lib, stdenv
, buildPythonPackage
, fetchPypi
, isPy27
, click
, click-log
, click-threading
, requests_toolbelt
, requests
, requests_oauthlib # required for google oauth sync
, atomicwrites
, hypothesis
, pytestCheckHook
, pytest-localserver
, pytest-subtesthack
, setuptools_scm
}:
buildPythonPackage rec {
version = "0.16.8";
pname = "vdirsyncer";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "bfdb422f52e1d4d60bd0635d203fb59fa7f613397d079661eb48e79464ba13c5";
};
propagatedBuildInputs = [
click click-log click-threading
requests_toolbelt
requests
requests_oauthlib # required for google oauth sync
atomicwrites
];
nativeBuildInputs = [
setuptools_scm
];
checkInputs = [
hypothesis
pytestCheckHook
pytest-localserver
pytest-subtesthack
];
postPatch = ''
substituteInPlace setup.py --replace "click>=5.0,<6.0" "click"
'';
preCheck = ''
export DETERMINISTIC_TESTS=true
'';
disabledTests = [
"test_verbosity"
"test_create_collections" # Flaky test exceeds deadline on hydra: https://github.com/pimutils/vdirsyncer/issues/837
];
meta = with lib; {
homepage = "https://github.com/pimutils/vdirsyncer";
description = "Synchronize calendars and contacts";
license = licenses.mit;
maintainers = with maintainers; [ loewenheim ];
};
}