From ba7b2c8e252a3ce981d87136b3b1c40f7319ba21 Mon Sep 17 00:00:00 2001 From: Zhong Jianxin Date: Wed, 23 Feb 2022 10:45:19 +0800 Subject: [PATCH] mido: Reduce dependances According to [mido document][1], python-rtmidi is the default recommended backend, the other backends are optional, and don't have all features. Remove pygame and rtmidi-python will reduce closure size from 930M to 87M, without losing functionality. I've check nixpkgs, no other package use specific mido backends. Even if they do need one, they can and should add the specific backend to their own buildInputs/propagatedBuildInputs, as mido dynamically load these python libraries, it will work as expected. For reference, [ArchLinux][2] and [Debian][3] both make some backends optional. [1]: https://mido.readthedocs.io/en/latest/backends/index.html [2]: https://aur.archlinux.org/packages/python-mido [3]: https://packages.debian.org/buster/python3-mido --- pkgs/development/python-modules/mido/default.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkgs/development/python-modules/mido/default.nix b/pkgs/development/python-modules/mido/default.nix index 909c224685ce..25d8d492dd71 100644 --- a/pkgs/development/python-modules/mido/default.nix +++ b/pkgs/development/python-modules/mido/default.nix @@ -4,9 +4,7 @@ , fetchPypi , substituteAll , portmidi -, pygame , python-rtmidi -, rtmidi-python , pytestCheckHook }: @@ -27,9 +25,7 @@ buildPythonPackage rec { ]; propagatedBuildInputs = [ - pygame python-rtmidi - rtmidi-python ]; checkInputs = [