nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 70 lines 1.3 kB view raw
1{ 2 stdenv, 3 lib, 4 buildPythonPackage, 5 fetchPypi, 6 replaceVars, 7 8 # build-system 9 setuptools, 10 setuptools-scm, 11 12 # dependencies 13 packaging, 14 15 # native dependencies 16 portmidi, 17 18 # optional-dependencies 19 pygame, 20 python-rtmidi, 21 rtmidi-python, 22 23 # tests 24 pytestCheckHook, 25 26}: 27 28buildPythonPackage rec { 29 pname = "mido"; 30 version = "1.3.3"; 31 pyproject = true; 32 33 src = fetchPypi { 34 inherit pname version; 35 hash = "sha256-GuyzC38oJATxfkN2jL90pqMb8is7eDvdEXoc6dIst0w="; 36 }; 37 38 patches = [ 39 (replaceVars ./libportmidi-cdll.patch { 40 libportmidi = "${portmidi.out}/lib/libportmidi${stdenv.hostPlatform.extensions.sharedLibrary}"; 41 }) 42 ]; 43 44 build-system = [ 45 setuptools 46 setuptools-scm 47 ]; 48 49 pythonRelaxDeps = [ "packaging" ]; 50 51 dependencies = [ packaging ]; 52 53 optional-dependencies = { 54 ports-pygame = [ pygame ]; 55 ports-rtmidi = [ python-rtmidi ]; 56 ports-rtmidi-python = [ rtmidi-python ]; 57 }; 58 59 nativeCheckInputs = [ pytestCheckHook ]; 60 61 pythonImportsCheck = [ "mido" ]; 62 63 meta = { 64 description = "MIDI Objects for Python"; 65 homepage = "https://mido.readthedocs.io"; 66 changelog = "https://github.com/mido/mido/releases/tag/${version}"; 67 license = lib.licenses.mit; 68 maintainers = [ ]; 69 }; 70}