ocamlPackages.uutf: 1.0.3 → 1.0.4

authored by Vincent Laporte and committed by Vincent Laporte 0aed97a4 be49b9d4

+42 -36
+42 -36
pkgs/development/ocaml-modules/uutf/default.nix
··· 8 8 cmdliner, 9 9 topkg, 10 10 uchar, 11 + version ? 12 + if lib.versionAtLeast ocaml.version "4.08" then 13 + "1.0.4" 14 + else if lib.versionAtLeast ocaml.version "4.03" then 15 + "1.0.3" 16 + else 17 + throw "uutf is not available with OCaml ${ocaml.version}", 11 18 }: 12 - let 13 - pname = "uutf"; 14 - in 15 19 16 - lib.throwIfNot (lib.versionAtLeast ocaml.version "4.03") 17 - "${pname} is not available with OCaml ${ocaml.version}" 20 + stdenv.mkDerivation { 21 + name = "ocaml${ocaml.version}-uutf-${version}"; 22 + inherit version; 18 23 19 - stdenv.mkDerivation 20 - rec { 21 - name = "ocaml${ocaml.version}-${pname}-${version}"; 22 - version = "1.0.3"; 24 + src = fetchurl { 25 + url = "https://erratique.ch/software/uutf/releases/uutf-${version}.tbz"; 26 + hash = 27 + { 28 + "1.0.3" = "sha256-h3KlYT0ecCmM4U3zMkGjaF8h5O9r20zwP+mF+x7KBWg="; 29 + "1.0.4" = "sha256-p6V45q+RSaiJThjjtHWchWWTemnGyaznowu/BIRhnKg="; 30 + } 31 + ."${version}"; 32 + }; 23 33 24 - src = fetchurl { 25 - url = "https://erratique.ch/software/${pname}/releases/${pname}-${version}.tbz"; 26 - sha256 = "sha256-h3KlYT0ecCmM4U3zMkGjaF8h5O9r20zwP+mF+x7KBWg="; 27 - }; 28 - 29 - nativeBuildInputs = [ 30 - ocaml 31 - ocamlbuild 32 - findlib 33 - topkg 34 - ]; 35 - buildInputs = [ 36 - topkg 37 - cmdliner 38 - ]; 39 - propagatedBuildInputs = [ uchar ]; 34 + nativeBuildInputs = [ 35 + ocaml 36 + ocamlbuild 37 + findlib 38 + topkg 39 + ]; 40 + buildInputs = [ 41 + topkg 42 + cmdliner 43 + ]; 44 + propagatedBuildInputs = [ uchar ]; 40 45 41 - strictDeps = true; 46 + strictDeps = true; 42 47 43 - inherit (topkg) buildPhase installPhase; 48 + inherit (topkg) buildPhase installPhase; 44 49 45 - meta = with lib; { 46 - description = "Non-blocking streaming Unicode codec for OCaml"; 47 - homepage = "https://erratique.ch/software/uutf"; 48 - license = licenses.bsd3; 49 - maintainers = [ maintainers.vbgl ]; 50 - mainProgram = "utftrip"; 51 - inherit (ocaml.meta) platforms; 52 - }; 53 - } 50 + meta = with lib; { 51 + description = "Non-blocking streaming Unicode codec for OCaml"; 52 + homepage = "https://erratique.ch/software/uutf"; 53 + changelog = "https://raw.githubusercontent.com/dbuenzli/uutf/refs/tags/v${version}/CHANGES.md"; 54 + license = licenses.isc; 55 + maintainers = [ maintainers.vbgl ]; 56 + mainProgram = "utftrip"; 57 + inherit (ocaml.meta) platforms; 58 + }; 59 + }