Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 45 lines 1.1 kB view raw
1{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uucp, uutf, cmdliner 2, cmdlinerSupport ? lib.versionAtLeast cmdliner.version "1.1" 3}: 4 5let 6 pname = "uuseg"; 7 webpage = "https://erratique.ch/software/${pname}"; 8in 9 10stdenv.mkDerivation rec { 11 12 name = "ocaml${ocaml.version}-${pname}-${version}"; 13 version = "15.0.0"; 14 15 src = fetchurl { 16 url = "${webpage}/releases/${pname}-${version}.tbz"; 17 sha256 = "sha256-q8x3bia1QaKpzrWFxUmLWIraKqby7TuPNGvbSjkY4eM="; 18 }; 19 20 nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; 21 buildInputs = [ topkg uutf ] 22 ++ lib.optional cmdlinerSupport cmdliner; 23 propagatedBuildInputs = [ uucp ]; 24 25 strictDeps = true; 26 27 buildPhase = '' 28 runHook preBuild 29 ${topkg.run} build \ 30 --with-uutf true \ 31 --with-cmdliner ${lib.boolToString cmdlinerSupport} 32 runHook postBuild 33 ''; 34 35 inherit (topkg) installPhase; 36 37 meta = with lib; { 38 description = "An OCaml library for segmenting Unicode text"; 39 homepage = webpage; 40 license = licenses.bsd3; 41 maintainers = [ maintainers.vbgl ]; 42 mainProgram = "usegtrip"; 43 inherit (ocaml.meta) platforms; 44 }; 45}