1 { lib, stdenv, fetchFromGitHub, ruby, dune_2, ocamlPackages
2 , ipaexfont, junicode, lmodern, lmmath
5 camlpdf = ocamlPackages.camlpdf.overrideAttrs (o: {
6 src = fetchFromGitHub {
9 rev = "v2.3.1+satysfi";
10 sha256 = "1s8wcqdkl1alvfcj67lhn3qdz8ikvd1v64f4q6bi4c0qj9lmp30k";
13 otfm = ocamlPackages.otfm.overrideAttrs (o: {
14 src = fetchFromGitHub {
17 rev = "v0.3.7+satysfi";
18 sha256 = "0y8s0ij1vp1s4h5y1hn3ns76fzki2ba5ysqdib33akdav9krbj8p";
21 yojson-with-position = ocamlPackages.buildDunePackage {
22 pname = "yojson-with-position";
24 src = fetchFromGitHub {
26 repo = "yojson-with-position";
27 rev = "v1.4.2+satysfi";
28 sha256 = "17s5xrnpim54d1apy972b5l08bph4c0m5kzbndk600fl0vnlirnl";
31 nativeBuildInputs = [ ocamlPackages.cppo ];
32 propagatedBuildInputs = [ ocamlPackages.biniou ];
33 inherit (ocamlPackages.yojson) meta;
36 stdenv.mkDerivation rec {
39 src = fetchFromGitHub {
43 sha256 = "sha256-cVGe1N3qMlEGAE/jPUji/X3zlijadayka1OL6iFioY4=";
44 fetchSubmodules = true;
48 substituteInPlace src/frontend/main.ml --replace \
49 '/usr/local/share/satysfi"; "/usr/share/satysfi' \
53 DUNE_PROFILE = "release";
55 nativeBuildInputs = [ ruby dune_2 ];
57 buildInputs = [ camlpdf otfm yojson-with-position ] ++ (with ocamlPackages; [
58 ocaml findlib menhir menhirLib
59 batteries camlimages core_kernel ppx_deriving uutf omd cppo re
63 cp -r ${ipaexfont}/share/fonts/opentype/* lib-satysfi/dist/fonts/
64 cp -r ${junicode}/share/fonts/junicode-ttf/* lib-satysfi/dist/fonts/
65 cp -r ${lmodern}/share/fonts/opentype/public/lm/* lib-satysfi/dist/fonts/
66 cp -r ${lmmath}/share/fonts/opentype/latinmodern-math.otf lib-satysfi/dist/fonts/
67 make install PREFIX=$out LIBDIR=$out/share/satysfi
68 mkdir -p $out/share/satysfi/
69 cp -r lib-satysfi/dist/ $out/share/satysfi/
73 homepage = "https://github.com/gfngfn/SATySFi";
74 description = "A statically-typed, functional typesetting system";
75 changelog = "https://github.com/gfngfn/SATySFi/blob/v${version}/CHANGELOG.md";
76 license = licenses.lgpl3Only;
77 maintainers = [ maintainers.mt-caret maintainers.marsam ];
78 platforms = platforms.all;