Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 101 lines 2.6 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 ocaml-ng, 5 ipaexfont, 6 junicode, 7 lmodern, 8 lmmath, 9 which, 10}: 11let 12 camlpdf = ocamlPackages.camlpdf.overrideAttrs (o: { 13 src = fetchFromGitHub { 14 owner = "gfngfn"; 15 repo = "camlpdf"; 16 rev = "v2.3.1+satysfi"; 17 sha256 = "1s8wcqdkl1alvfcj67lhn3qdz8ikvd1v64f4q6bi4c0qj9lmp30k"; 18 }; 19 nativeBuildInputs = [ which ] ++ o.nativeBuildInputs; 20 }); 21 yojson-with-position = ocamlPackages.buildDunePackage { 22 pname = "yojson-with-position"; 23 version = "1.4.2"; 24 src = fetchFromGitHub { 25 owner = "gfngfn"; 26 repo = "yojson-with-position"; 27 rev = "v1.4.2+satysfi"; 28 sha256 = "17s5xrnpim54d1apy972b5l08bph4c0m5kzbndk600fl0vnlirnl"; 29 }; 30 nativeBuildInputs = [ ocamlPackages.cppo ]; 31 propagatedBuildInputs = [ ocamlPackages.biniou ]; 32 inherit (ocamlPackages.yojson) meta; 33 }; 34 ocamlPackages = ocaml-ng.ocamlPackages_4_14; 35 version = "0.0.11"; 36in 37ocamlPackages.buildDunePackage { 38 pname = "satysfi"; 39 inherit version; 40 41 src = fetchFromGitHub { 42 owner = "gfngfn"; 43 repo = "SATySFi"; 44 tag = "v${version}"; 45 hash = "sha256-eeeoUVTGId56SQvrmmMc7nwH/blrXgwcw3+0FLbvc34="; 46 fetchSubmodules = true; 47 }; 48 49 preConfigure = '' 50 substituteInPlace src/frontend/main.ml --replace \ 51 '/usr/local/share/satysfi"; "/usr/share/satysfi' \ 52 $out/share/satysfi 53 ''; 54 55 nativeBuildInputs = with ocamlPackages; [ 56 menhir 57 cppo 58 ]; 59 60 buildInputs = [ 61 camlpdf 62 yojson-with-position 63 ] 64 ++ (with ocamlPackages; [ 65 menhirLib 66 batteries 67 camlimages 68 core_kernel 69 ppx_deriving 70 uutf 71 omd 72 re 73 otfed 74 ]); 75 76 postInstall = '' 77 mkdir -p $out/share/satysfi/dist/fonts 78 cp -r lib-satysfi/dist/ $out/share/satysfi/ 79 cp -r \ 80 ${ipaexfont}/share/fonts/opentype/* \ 81 ${lmodern}/share/fonts/opentype/public/lm/* \ 82 ${lmmath}/share/fonts/opentype/latinmodern-math.otf \ 83 ${junicode}/share/fonts/truetype/Junicode-{Bold,BoldItalic,Italic}.ttf \ 84 $out/share/satysfi/dist/fonts/ 85 cp ${junicode}/share/fonts/truetype/Junicode-Regular.ttf \ 86 $out/share/satysfi/dist/fonts/Junicode.ttf 87 ''; 88 89 meta = { 90 homepage = "https://github.com/gfngfn/SATySFi"; 91 description = "Statically-typed, functional typesetting system"; 92 changelog = "https://github.com/gfngfn/SATySFi/blob/v${version}/CHANGELOG.md"; 93 license = lib.licenses.lgpl3Only; 94 maintainers = with lib.maintainers; [ 95 mt-caret 96 momeemt 97 ]; 98 platforms = lib.platforms.all; 99 mainProgram = "satysfi"; 100 }; 101}