nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 56 lines 1.0 kB view raw
1{ lib 2, buildPythonPackage 3, cython 4, devtools 5, email_validator 6, fetchFromGitHub 7, pytest-mock 8, pytestCheckHook 9, python-dotenv 10, pythonOlder 11, typing-extensions 12}: 13 14buildPythonPackage rec { 15 pname = "pydantic"; 16 version = "1.9.0"; 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "samuelcolvin"; 21 repo = pname; 22 rev = "v${version}"; 23 sha256 = "sha256-C4WP8tiMRFmkDkQRrvP3yOSM2zN8pHJmX9cdANIckpM="; 24 }; 25 26 nativeBuildInputs = [ 27 cython 28 ]; 29 30 propagatedBuildInputs = [ 31 devtools 32 email_validator 33 python-dotenv 34 typing-extensions 35 ]; 36 37 checkInputs = [ 38 pytest-mock 39 pytestCheckHook 40 ]; 41 42 preCheck = '' 43 export HOME=$(mktemp -d) 44 ''; 45 46 enableParallelBuilding = true; 47 48 pythonImportsCheck = [ "pydantic" ]; 49 50 meta = with lib; { 51 homepage = "https://github.com/samuelcolvin/pydantic"; 52 description = "Data validation and settings management using Python type hinting"; 53 license = licenses.mit; 54 maintainers = with maintainers; [ wd15 ]; 55 }; 56}