at 23.05-pre 1.1 kB view raw
1{ lib, buildPythonPackage, fetchFromSourcehut, pythonOlder 2, cmake, cython, alure2, typing-extensions 3}: 4 5buildPythonPackage rec { 6 pname = "palace"; 7 version = "0.2.5"; 8 disabled = pythonOlder "3.6"; 9 10 src = fetchFromSourcehut { 11 owner = "~cnx"; 12 repo = pname; 13 rev = version; 14 sha256 = "1z0m35y4v1bg6vz680pwdicm9ssryl0q6dm9hfpb8hnifmridpcj"; 15 }; 16 17 # Nix uses Release CMake configuration instead of what is assumed by palace. 18 postPatch = '' 19 substituteInPlace CMakeLists.txt \ 20 --replace IMPORTED_LOCATION_NOCONFIG IMPORTED_LOCATION_RELEASE 21 ''; 22 23 dontUseCmakeConfigure = true; 24 25 nativeBuildInputs = [ cmake ]; 26 buildInputs = [ cython ]; 27 propagatedBuildInputs = [ alure2 ] ++ lib.optionals (pythonOlder "3.8") [ 28 typing-extensions 29 ]; 30 31 doCheck = false; # FIXME: tests need an audio device 32 pythonImportsCheck = [ "palace" ]; 33 34 meta = with lib; { 35 description = "Pythonic Audio Library and Codecs Environment"; 36 homepage = "https://mcsinyx.gitlab.io/palace"; 37 license = licenses.lgpl3Plus; 38 maintainers = [ maintainers.McSinyx ]; 39 }; 40}