nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 poetry-core,
6 pytestCheckHook,
7 pytz,
8 requests,
9 requests-mock,
10}:
11
12buildPythonPackage (finalAttrs: {
13 pname = "meteofrance-api";
14 version = "1.5.0";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "hacf-fr";
19 repo = "meteofrance-api";
20 tag = "v${finalAttrs.version}";
21 hash = "sha256-zvfFMxXbCul14OXaoRdjMWKW3FYyTUcYGklHgb04nvA=";
22 };
23
24 build-system = [ poetry-core ];
25
26 dependencies = [
27 pytz
28 requests
29 ];
30
31 nativeCheckInputs = [
32 pytestCheckHook
33 requests-mock
34 ];
35
36 pythonImportsCheck = [ "meteofrance_api" ];
37
38 disabledTests = [
39 # Tests require network access
40 "test_currentphenomenons"
41 "test_dictionary"
42 "test_forecast"
43 "test_full_with_coastal_bulletin"
44 "test_fulls"
45 "test_no_rain_expected"
46 "test_picture_of_the_day"
47 "test_places"
48 "test_rain"
49 "test_session"
50 "test_observation"
51 "test_workflow"
52 ];
53
54 meta = {
55 description = "Module to access information from the Meteo-France API";
56 homepage = "https://github.com/hacf-fr/meteofrance-api";
57 changelog = "https://github.com/hacf-fr/meteofrance-api/releases/tag/${finalAttrs.src.tag}";
58 license = lib.licenses.mit;
59 maintainers = with lib.maintainers; [ fab ];
60 mainProgram = "meteofrance-api";
61 };
62})