1{
2 lib,
3 buildPythonPackage,
4 fetchFromSourcehut,
5 pythonOlder,
6 cmake,
7 cython_0,
8 setuptools,
9 alure2,
10}:
11
12buildPythonPackage rec {
13 pname = "palace";
14 version = "0.2.5";
15 pyproject = true;
16
17 disabled = pythonOlder "3.6";
18
19 src = fetchFromSourcehut {
20 owner = "~cnx";
21 repo = "palace";
22 rev = version;
23 sha256 = "1z0m35y4v1bg6vz680pwdicm9ssryl0q6dm9hfpb8hnifmridpcj";
24 };
25
26 # Nix uses Release CMake configuration instead of what is assumed by palace.
27 postPatch = ''
28 substituteInPlace CMakeLists.txt \
29 --replace IMPORTED_LOCATION_NOCONFIG IMPORTED_LOCATION_RELEASE
30 '';
31
32 build-system = [
33 cmake
34 cython_0
35 setuptools
36 ];
37
38 dontUseCmakeConfigure = true;
39
40 propagatedBuildInputs = [ alure2 ];
41
42 doCheck = false; # FIXME: tests need an audio device
43
44 pythonImportsCheck = [ "palace" ];
45
46 meta = with lib; {
47 description = "Pythonic Audio Library and Codecs Environment";
48 homepage = "https://mcsinyx.gitlab.io/palace";
49 license = licenses.lgpl3Plus;
50 maintainers = [ maintainers.McSinyx ];
51 };
52}