nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchFromGitHub,
6 pytest-asyncio,
7 pytest-timeout,
8 pytestCheckHook,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "pypck";
14 version = "0.9.9";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "alengwenus";
19 repo = "pypck";
20 tag = version;
21 hash = "sha256-EsPfPRYp75GML9JMoFPf5U8obh51LjIkg/FFRNkrEOY=";
22 };
23
24 postPatch = ''
25 echo "${version}" > VERSION
26 '';
27
28 build-system = [ setuptools ];
29
30 nativeCheckInputs = [
31 pytest-asyncio
32 pytest-timeout
33 pytestCheckHook
34 ];
35
36 disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ "test_connection_lost" ];
37
38 __darwinAllowLocalNetworking = true;
39
40 pythonImportsCheck = [ "pypck" ];
41
42 meta = {
43 description = "LCN-PCK library written in Python";
44 homepage = "https://github.com/alengwenus/pypck";
45 changelog = "https://github.com/alengwenus/pypck/releases/tag/${src.tag}";
46 license = lib.licenses.epl20;
47 maintainers = with lib.maintainers; [ fab ];
48 };
49}