1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 setuptools,
6 numpy,
7 fluidsynth,
8 stdenv,
9}:
10
11buildPythonPackage rec {
12 pname = "pyfluidsynth";
13 version = "1.3.4";
14 format = "pyproject";
15
16 src = fetchPypi {
17 inherit pname version;
18 hash = "sha256-ynQcJity5IljFJxzv4roDkXITCPJvfgDomujJMuy1bI=";
19 };
20
21 postPatch = ''
22 substituteInPlace fluidsynth.py \
23 --replace-fail \
24 "find_library(lib_name)" \
25 '"${lib.getLib fluidsynth}/lib/libfluidsynth${stdenv.hostPlatform.extensions.sharedLibrary}"'
26 '';
27
28 build-system = [ setuptools ];
29
30 dependencies = [ numpy ];
31
32 pythonImportsCheck = [ "fluidsynth" ];
33
34 meta = with lib; {
35 description = "Python bindings for FluidSynth, a MIDI synthesizer that uses SoundFont instruments";
36 homepage = "https://github.com/nwhitehead/pyfluidsynth";
37 license = licenses.lgpl21Plus;
38 maintainers = with maintainers; [ figsoda ];
39 };
40}