1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 14:41:17 +00:00

Merge pull request #139395 from fabaff/renault-api

This commit is contained in:
Martin Weinelt 2021-09-26 01:49:48 +02:00 committed by GitHub
commit 1694ea023a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 119 additions and 1 deletions

View file

@ -0,0 +1,45 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, marshmallow
, marshmallow-enum
, pytestCheckHook
, pythonOlder
, typeguard
, typing-inspect
}:
buildPythonPackage rec {
pname = "marshmallow-dataclass";
version = "8.5.3";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "lovasoa";
repo = "marshmallow_dataclass";
rev = "v${version}";
sha256 = "0mngkjfs2nxxr0y77n429hb22rmjxbnn95j4vwqr9y6q16bqxs0w";
};
propagatedBuildInputs = [
marshmallow
typing-inspect
];
checkInputs = [
marshmallow-enum
pytestCheckHook
typeguard
];
pythonImportsCheck = [ "marshmallow_dataclass" ];
meta = with lib; {
description = "Automatic generation of marshmallow schemas from dataclasses";
homepage = "https://github.com/lovasoa/marshmallow_dataclass";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}

View file

@ -0,0 +1,68 @@
{ lib
, aiohttp
, aioresponses
, buildPythonPackage
, click
, dateparser
, fetchFromGitHub
, fetchpatch
, marshmallow-dataclass
, poetry-core
, pyjwt
, pythonOlder
, pytest-asyncio
, pytestCheckHook
, tabulate
}:
buildPythonPackage rec {
pname = "renault-api";
version = "0.1.4";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "hacf-fr";
repo = pname;
rev = "v${version}";
sha256 = "049kh63yk0r0falqbl5akcwgzqjrkqqhf9y537rrlzc85ihf28b8";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
aiohttp
click
dateparser
marshmallow-dataclass
pyjwt
tabulate
];
checkInputs = [
aioresponses
pytest-asyncio
pytestCheckHook
];
patches = [
# Switch to poetry-core, https://github.com/hacf-fr/renault-api/pull/371
(fetchpatch {
name = "switch-to-poetry-core.patch";
url = "https://github.com/hacf-fr/renault-api/commit/5457a612b9ff9f323e8449cbe9dbce465bd65a79.patch";
sha256 = "0ds9m4j2qpv0nyg9p8dk9klnarl8wckwclddgnii6h47qci362yy";
})
];
pythonImportsCheck = [ "renault_api" ];
meta = with lib; {
description = "Python library to interact with the Renault API";
homepage = "https://github.com/hacf-fr/renault-api";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}

View file

@ -703,7 +703,7 @@
"remember_the_milk" = ps: with ps; [ httplib2 ]; # missing inputs: RtmAPI
"remote" = ps: with ps; [ ];
"remote_rpi_gpio" = ps: with ps; [ ]; # missing inputs: gpiozero
"renault" = ps: with ps; [ ]; # missing inputs: renault-api
"renault" = ps: with ps; [ renault-api ];
"repetier" = ps: with ps; [ ]; # missing inputs: pyrepetier
"rest" = ps: with ps; [ jsonpath xmltodict ];
"rest_command" = ps: with ps; [ ];

View file

@ -576,6 +576,7 @@ in with py.pkgs; buildPythonApplication rec {
"recorder"
"reddit"
"remote"
"renault"
"rest"
"rest_command"
"rflink"

View file

@ -4472,6 +4472,8 @@ in {
marshmallow = callPackage ../development/python-modules/marshmallow { };
marshmallow-dataclass = callPackage ../development/python-modules/marshmallow-dataclass { };
marshmallow-enum = callPackage ../development/python-modules/marshmallow-enum { };
marshmallow-oneofschema = callPackage ../development/python-modules/marshmallow-oneofschema { };
@ -7809,6 +7811,8 @@ in {
remarshal = callPackage ../development/python-modules/remarshal { };
renault-api = callPackage ../development/python-modules/renault-api { };
rencode = callPackage ../development/python-modules/rencode { };
reparser = callPackage ../development/python-modules/reparser { };