1{ lib
2, buildPythonPackage
3, fetchPypi
4, ply
5, roman
6, uqbar
7, pythonOlder
8, pytestCheckHook
9, lilypond
10}:
11
12buildPythonPackage rec {
13 pname = "abjad";
14 version = "3.19";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.10";
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-I9t3ORUKFFlMfXJsAzXhCzl1B4a9/ZNmvSX2/R44TPs=";
22 };
23
24 propagatedBuildInputs = [
25 ply
26 roman
27 uqbar
28 ];
29
30 buildInputs = [
31 lilypond
32 ];
33
34 nativeCheckInputs = [
35 pytestCheckHook
36 ];
37
38 postPatch = ''
39 substituteInPlace abjad/io.py \
40 --replace 'lilypond_path = self.get_lilypond_path()' \
41 'lilypond_path = "${lilypond}/bin/lilypond"'
42 # general invocations of binary for IO purposes
43
44 substituteInPlace abjad/configuration.py \
45 --replace '["lilypond"' '["${lilypond}/bin/lilypond"'
46 # get_lilypond_version_string
47 '';
48
49 pythonImportsCheck = [ "abjad" ];
50
51 meta = {
52 description = "GNU LilyPond wrapper for Python";
53 longDescription = ''
54 Abjad helps composers build up complex pieces of music notation in
55 iterative and incremental ways. Use Abjad to create a symbolic
56 representation of all the notes, rests, chords, tuplets, beams and slurs
57 in any score. Because Abjad extends the Python programming language, you
58 can use Abjad to make systematic changes to music as you work. Because
59 Abjad wraps the LilyPond music notation package, you can use Abjad to
60 control the typographic detail of symbols on the page.
61 '';
62 license = lib.licenses.mit;
63 homepage = "https://abjad.github.io/";
64 changelog = "https://abjad.github.io/appendices/changes.html";
65 maintainers = [ lib.maintainers.davisrichard437 ];
66 };
67}