@@ -0,0 +1,41 @@
1+{ stdenv, fetchFromGitHub, python, fontforge }:
2+
3+stdenv.mkDerivation rec {
4+ name = "monoid-${version}";
5+ version = "2016-07-21";
6+
7+ src = fetchFromGitHub {
8+ owner = "larsenwork";
9+ repo = "monoid";
10+ rev = "e9d77ec18c337dc78ceae787a673328615f0b120";
11+ sha256 = "07h5q6cn6jjpmxp9vyag1bxx481waz344sr2kfs7d37bba8yjydj";
12+ };
13+
14+ nativeBuildInputs = [ python fontforge ];
15+
16+ enableParallelBuilding = true;
17+
18+ buildPhase = ''
19+ local _d=""
20+ local _l=""
21+ for _d in {Monoisome,Source}/*.sfdir; do
22+ _l="''${_d##*/}.log"
23+ echo "Building $_d (log at $_l)"
24+ python Scripts/build.py ${if enableParallelBuilding then "$NIX_BUILD_CORES" else "1"} 0 $_d > $_l
25+ done
26+ '';
27+
28+ installPhase = ''
29+ mkdir -p $out/share/{doc,fonts/truetype}
30+ cp -va _release/* $out/share/fonts/truetype
31+ cp -va Readme.md $out/share/doc
32+ '';
33+
34+ meta = with stdenv.lib; {
35+ homepage = http://larsenwork.com/monoid;
36+ description = "Customisable coding font with alternates, ligatures and contextual positioning";
37+ license = [ licenses.ofl licenses.mit ];
38+ platforms = platforms.all;
39+ maintainers = [ maintainers.romildo ];
40+ };
41+}