diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2023-09-09 19:57:14 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-09 19:57:14 -0500 |
commit | 6f5b1460db748b85e25cc7e9285f5d9b53fc0700 (patch) | |
tree | 445bbc00582989b6e1585c2149347d0af62babbe /pkgs | |
parent | 8039b303ca31bc770a6ad74a31215fb6e4d7e04c (diff) | |
parent | 91ba9e809f55c12b66d29740963dadc75bb6ffdc (diff) |
Merge pull request #254153 from figsoda/upiano
upiano: init at 0.1.2
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/by-name/up/upiano/package.nix | 38 | ||||
-rw-r--r-- | pkgs/development/python-modules/pyfluidsynth/default.nix | 55 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 2 |
3 files changed, 95 insertions, 0 deletions
diff --git a/pkgs/by-name/up/upiano/package.nix b/pkgs/by-name/up/upiano/package.nix new file mode 100644 index 0000000000000..d13ff18bd4256 --- /dev/null +++ b/pkgs/by-name/up/upiano/package.nix @@ -0,0 +1,38 @@ +{ lib +, python3 +, fetchFromGitHub +}: + +python3.pkgs.buildPythonApplication rec { + pname = "upiano"; + version = "0.1.2"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "eliasdorneles"; + repo = "upiano"; + rev = "v${version}"; + hash = "sha256-5WhflvUCjzW4ZJ+PLUTMbKcUnQa3ChkDjl0R5YvjBWk="; + forceFetchGit = true; + fetchLFS = true; + }; + + nativeBuildInputs = [ + python3.pkgs.poetry-core + ]; + + propagatedBuildInputs = with python3.pkgs; [ + pyfluidsynth + textual + ]; + + pythonImportsCheck = [ "upiano" ]; + + meta = with lib; { + description = "A Piano in your terminal"; + homepage = "https://github.com/eliasdorneles/upiano"; + license = licenses.mit; + maintainers = with maintainers; [ figsoda ]; + mainProgram = "upiano"; + }; +} diff --git a/pkgs/development/python-modules/pyfluidsynth/default.nix b/pkgs/development/python-modules/pyfluidsynth/default.nix new file mode 100644 index 0000000000000..1e837b67129a7 --- /dev/null +++ b/pkgs/development/python-modules/pyfluidsynth/default.nix @@ -0,0 +1,55 @@ +{ lib +, buildPythonPackage +, fetchPypi +, setuptools +, wheel +, numpy +, fluidsynth +, stdenv +, fetchpatch +}: + +buildPythonPackage rec { + pname = "pyfluidsynth"; + version = "1.3.2"; + format = "pyproject"; + + src = fetchPypi { + pname = "pyFluidSynth"; + inherit version; + hash = "sha256-+i5oOXV4UG6z4rQGuguOP0mHo7V7fJZZRwOnJKB1VfQ="; + }; + + patches = [ + # fixes error: Unknown integer parameter 'synth.sample-rate' + # https://github.com/nwhitehead/pyfluidsynth/pull/44 + (fetchpatch { + name = "add-fluid-synth-get-status-and-fix-some-typing-bugs.patch"; + url = "https://github.com/nwhitehead/pyfluidsynth/commit/1b31ca6ab00930dbb515c4cc00bb31a65578b7c0.patch"; + hash = "sha256-ZCqy7aIv5iAAJrWOD7e538xltj11gy5fakIXnAbUsu8="; + }) + ]; + + nativeBuildInputs = [ + setuptools + wheel + ]; + + propagatedBuildInputs = [ + numpy + ]; + + pythonImportsCheck = [ "fluidsynth" ]; + + postPatch = '' + sed -Ezi fluidsynth.py -e \ + 's|lib = .*\\\n[^\n]*|lib = "${lib.getLib fluidsynth}/lib/libfluidsynth${stdenv.hostPlatform.extensions.sharedLibrary}"|' + ''; + + meta = with lib; { + description = "Python bindings for FluidSynth, a MIDI synthesizer that uses SoundFont instruments"; + homepage = "https://github.com/nwhitehead/pyfluidsynth"; + license = licenses.lgpl21Plus; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0ec2a6fb11da4..55ccc19117166 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8222,6 +8222,8 @@ self: super: with self; { pyflick = callPackage ../development/python-modules/pyflick { }; + pyfluidsynth = callPackage ../development/python-modules/pyfluidsynth { }; + pyfreedompro = callPackage ../development/python-modules/pyfreedompro { }; pygments-style-github = callPackage ../development/python-modules/pygments-style-github { }; |