anvil-editor: init at 0.4
[NixPkgs.git] / pkgs / misc / lilypond / fonts.nix
blobb624498f0920e738847d4af53374cad52d2f3c57
1 { lib, stdenv, fetchFromGitHub, lilypond }:
3 let
5   olpFont = { fontName, rev, sha256, version ? rev, ... }:
6     stdenv.mkDerivation {
7       inherit version;
8       pname = "openlilypond-font-${fontName}";
10       src = fetchFromGitHub {
11         inherit rev sha256;
12         owner = "OpenLilyPondFonts";
13         repo = fontName;
14       };
16       installPhase = ''
17         local fontsdir="$out/share/lilypond/${lilypond.version}/fonts"
19         install -m755 -d "$fontsdir/otf"
21         shopt -s globstar
23         for font in {otf,supplementary-fonts,supplementary-files}/**/*.{o,t}tf; do
24           echo $font
25           install -Dt "$fontsdir/otf" -m644 "$font"
26         done
28         install -m755 -d "$fontsdir/svg"
29         for font in {svg,woff}/**.{svg,woff}; do
30           install -Dt "$fontsdir/svg" -m644 "$font"
31         done
32       '';
34       meta = with lib; {
35         inherit (lilypond.meta) homepage platforms;
36         description = "${fontName} font for LilyPond";
37         license = licenses.ofl;
38         maintainers = with maintainers; [ yurrriq ];
39       };
40     };
44 rec {
45   beethoven = olpFont {
46     fontName = "beethoven";
47     rev = "669f400";
48     sha256 = "17wdklg5shmqwnb7b81qavfg52v32wx5yf15c6al0hbvv1nqqj2i";
49   };
50   bravura = olpFont {
51     fontName = "bravura";
52     rev = "53c7744";
53     sha256 = "1p27w1c3bzxlnm6rzq8n7dbfjwbxqjy4r0fhkmk9jbm8awmzw214";
54   };
55   cadence = olpFont {
56     fontName = "cadence";
57     rev = "1cc0fb7";
58     sha256 = "1zxb3m8glh8iwj8mzcgyaxhlq0bji0rwniw702m70h9kpifiim1j";
59   };
60   gonville = olpFont {
61     fontName = "gonville";
62     rev = "a638bc9";
63     sha256 = "15khy9677crgd6bpajn7l1drysgxy49wiym3b248khgpavidwyy9";
64   };
65   gutenberg1939 = olpFont {
66     fontName = "gutenberg1939";
67     rev = "2316a35";
68     sha256 = "1lkhivmrx92z37zfrb5mkhzhwggyaga9cm0wl89r0n2f2kayyc7q";
69   };
70   haydn = olpFont {
71     fontName = "haydn";
72     rev = "9e7de8b";
73     sha256 = "1jmbhb2jm887sdc498l2jilpivq1d8lmmgdb8lp59lv8d9fx105z";
74   };
75   improviso = olpFont {
76     fontName = "improviso";
77     rev = "0753f5a";
78     sha256 = "1clin9c74gjhhira12mwxynxn4b1ixij5bg04mvk828lbr740mfm";
79   };
80   lilyboulez = olpFont {
81     fontName = "lilyboulez";
82     rev = "e8455fc";
83     sha256 = "0mq92x0rbgfb6s7ipgg2zcxika2si30w3ay89rp7m6vwca01649y";
84   };
85   lilyjazz = olpFont {
86     fontName = "lilyjazz";
87     rev = "8fa7d554";
88     sha256 = "1z7px7k2sn7snnj7yfjv0p9axwbn452vn9ww9icmb1249b0d1qry";
89   };
90   lv-goldenage = olpFont {
91     fontName = "lv-goldenage";
92     rev = "8a92fd3";
93     sha256 = "03nbd1vmlaj7wkhsnl2lq09nafv7zj1k518zs966vclzah94qghp";
94   };
95   paganini = olpFont {
96     fontName = "paganini";
97     rev = "8e4e55a";
98     sha256 = "0gw9wr4hfn205j40rpgnfddhzhn9x4pwfinamj5b7607880nvx29";
99   };
100   profondo = olpFont {
101     fontName = "profondo";
102     rev = "8cfb668";
103     sha256 = "0armwbg9y0l935949b7klngws6fq42fi944lws61qvjl61780br8";
104   };
105   ross = olpFont {
106     fontName = "ross";
107     rev = "aa8127f";
108     sha256 = "1w2x3pd1d1z4x0107dpq95v7m547cj4nkkzxgqpmzfqa0074idqd";
109   };
110   scorlatti = olpFont {
111     fontName = "scorlatti";
112     rev = "1db87da";
113     sha256 = "07jam5hwdy6bydrm98cdla6p6rl8lmy8zzsfq46i55l64l3w956h";
114   };
115   sebastiano = olpFont {
116     fontName = "sebastiano";
117     rev = "44bf262";
118     sha256 = "09i8p3p4z6vz69j187cpxvikkgc4pk6gxippahy0k7i7bh0d4qaj";
119   };
121   all = [
122     beethoven
123     bravura
124     cadence
125     gonville
126     gutenberg1939
127     haydn
128     improviso
129     lilyboulez
130     lilyjazz
131     lv-goldenage
132     paganini
133     profondo
134     ross
135     scorlatti
136     sebastiano
137   ];