git.iko.soy/typeable/nixpkgs
on master help sign in
ocamlPackages.uunf: 13.0.0 → 14.0.0
commit307a7c38cc0a76fddc953d144a14c918e2819c1b authorVincent Laporte <Vincent.Laporte@gmail.com> dateWed 6 Oct 2021, 07:10 (5 years ago) parentbb2f467
1 file changed+9−38
pkgs/development/ocaml-modules/uunf/default.nix+9−38
pkgs/development/ocaml-modules/uunf/default.nix+9−38
@@ -1,50 +1,24 @@
1−{ lib, stdenv, fetchurl, unzip, ocaml, findlib, ocamlbuild, topkg, uchar, uutf, cmdliner, uucd }:
1+{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uchar, uutf, cmdliner }:
22let
33 pname = "uunf";
44 webpage = "https://erratique.ch/software/${pname}";
5− version = "13.0.0";
6− ucdxml = fetchurl {
7− url = "http://www.unicode.org/Public/${version}/ucdxml/ucd.all.grouped.zip";
8− sha256 = "04gpl09ggb6fb0kmk6298rd8184dv6vcscn28l1gpdv1yjlw1a8q";
9− };
10− gen = fetchurl {
11− url = "https://raw.githubusercontent.com/dbuenzli/uunf/v12.0.0/support/gen.ml";
12− sha256 = "08j2mpi7j6q3rqc6bcdwspqn1s7pkkphznxfdycqjv4h9yaqsymj";
13− };
14− gen_norm = fetchurl {
15− url = "https://raw.githubusercontent.com/dbuenzli/uunf/v12.0.0/support/gen_norm.ml";
16− sha256 = "11vx5l5bag6bja7qj8jv4s2x9fknj3557n0mj87k2apq5gs5f4m5";
17− };
18− gen_props = fetchurl {
19− url = "https://raw.githubusercontent.com/dbuenzli/uunf/v12.0.0/support/gen_props.ml";
20− sha256 = "0a6lhja498kp9lxql0pbfvkgvajs10wx88wkqc7y5m3lrvw46268";
21− };
5+ version = "14.0.0";
226in
237
24−assert lib.versionAtLeast ocaml.version "4.03";
8+if !lib.versionAtLeast ocaml.version "4.03"
9+then throw "${pname} is not available for OCaml ${ocaml.version}"
10+else
2511
2612stdenv.mkDerivation {
27− name = "ocaml-${pname}-${version}";
13+ name = "ocaml${ocaml.version}-${pname}-${version}";
2814 inherit version;
2915
3016 src = fetchurl {
3117 url = "${webpage}/releases/${pname}-${version}.tbz";
32− sha256 = "1qci04nkp24kdls1z4s8kz5dzgky4nwd5r8345nwdrgwmxhw7ksm";
18+ sha256 = "sha256:17wv0nm3vvwcbzb1b09akw8jblmigyhbfmh1sy9lkb5756ni94a2";
3319 };
3420
35− postConfigure = ''
36− rm -f src/uunf_data.ml
37− mkdir -p support/
38− cp ${gen} support/gen.ml
39− cp ${gen_norm} support/gen_norm.ml
40− cp ${gen_props} support/gen_props.ml
41− funzip ${ucdxml} > support/ucd.xml
42− ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/ pkg/build_support.ml
43− '';
44−
45− nativeBuildInputs = [ unzip ];
46−
47− buildInputs = [ ocaml findlib ocamlbuild topkg uutf cmdliner uucd ];
21+ buildInputs = [ ocaml findlib ocamlbuild topkg uutf cmdliner ];
4822
4923 propagatedBuildInputs = [ uchar ];
5024
@@ -53,11 +27,8 @@ stdenv.mkDerivation {
5327 meta = with lib; {
5428 description = "An OCaml module for normalizing Unicode text";
5529 homepage = webpage;
56− platforms = ocaml.meta.platforms or [];
30+ inherit (ocaml.meta) platforms;
5731 license = licenses.bsd3;
5832 maintainers = [ maintainers.vbgl ];
59− # See https://github.com/dbuenzli/uunf/issues/15#issuecomment-903151264
60− broken = lib.versions.majorMinor ocaml.version == "4.08"
61− && stdenv.hostPlatform.isAarch64;
6233 };
6334}