1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchpatch2,
6 setuptools,
7 python,
8 liblo,
9 cython,
10}:
11
12buildPythonPackage rec {
13 pname = "pyliblo3";
14 version = "0.16.3";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "gesellkammer";
19 repo = "pyliblo3";
20 tag = "v${version}";
21 hash = "sha256-QfwZXkUT4U2Gfbv3rk0F/bze9hwJGn7H8t0X1SWqIuc=";
22 };
23
24 patches = [
25 # https://github.com/NixOS/nixpkgs/issues/437077
26 (fetchpatch2 {
27 name = "fix-compilation-for-cython-3.1.2";
28 url = "https://github.com/gesellkammer/pyliblo3/commit/baa249acf91bcb851aa4e30e53e88728fe0fb0c9.patch?full_index=1";
29 hash = "sha256-fMKBVIZLBq62khhX40tpaM47nuHB0eqiURIul/4LMig=";
30 })
31 ];
32
33 build-system = [
34 setuptools
35 cython
36 ];
37
38 buildInputs = [ liblo ];
39
40 pythonImportsCheck = [ "pyliblo3" ];
41
42 checkPhase = ''
43 runHook preCheck
44 ${python.interpreter} ./test/unit.py
45 runHook postCheck
46 '';
47
48 meta = {
49 homepage = "https://github.com/gesellkammer/pyliblo3/";
50 description = "Python wrapper for the liblo OSC library";
51 changelog = "https://github.com/gesellkammer/pyliblo3/blob/${src.tag}/NEWS";
52 license = lib.licenses.lgpl21Plus;
53 maintainers = [ lib.maintainers.archercatneo ];
54 };
55}