nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 isPyPy,
6
7 # build-system
8 setuptools,
9
10 # tests
11 freezegun,
12 glibcLocales,
13 pytestCheckHook,
14 pytz,
15 tzdata,
16}:
17
18buildPythonPackage rec {
19 pname = "babel";
20 version = "2.17.0";
21 pyproject = true;
22
23 src = fetchPypi {
24 inherit pname version;
25 hash = "sha256-DFTP+xn2kM3MUqO1C8v3HgeoCNHIDVSfJFm50s8K+50=";
26 };
27
28 build-system = [ setuptools ];
29
30 nativeCheckInputs = [
31 freezegun
32 glibcLocales
33 pytestCheckHook
34 # https://github.com/python-babel/babel/issues/988#issuecomment-1521765563
35 pytz
36 ]
37 ++ lib.optionals isPyPy [ tzdata ];
38
39 disabledTests = [
40 # fails on days switching from and to daylight saving time in EST
41 # https://github.com/python-babel/babel/issues/988
42 "test_format_time"
43 ];
44
45 pythonImportsCheck = [ "babel" ];
46
47 meta = {
48 description = "Collection of internationalizing tools";
49 homepage = "https://babel.pocoo.org/";
50 changelog = "https://github.com/python-babel/babel/releases/tag/v${version}";
51 license = lib.licenses.bsd3;
52 maintainers = with lib.maintainers; [ getchoo ];
53 mainProgram = "pybabel";
54 };
55}