From 479bc9d9e61b70cf827b2ce16a095a1e46ad87c5 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 18 Jan 2020 16:20:00 -0500 Subject: [PATCH 1/2] ocamlPackages.sedlex_2: init at 2.1 --- pkgs/development/ocaml-modules/sedlex/2.nix | 69 +++++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 + 2 files changed, 71 insertions(+) create mode 100644 pkgs/development/ocaml-modules/sedlex/2.nix diff --git a/pkgs/development/ocaml-modules/sedlex/2.nix b/pkgs/development/ocaml-modules/sedlex/2.nix new file mode 100644 index 000000000000..09390a27343f --- /dev/null +++ b/pkgs/development/ocaml-modules/sedlex/2.nix @@ -0,0 +1,69 @@ +{ stdenv +, fetchFromGitHub +, fetchurl +, ocaml +, dune +, findlib +, gen +, ppx_tools_versioned +, ocaml-migrate-parsetree +, uchar +}: + +if stdenv.lib.versionOlder ocaml.version "4.02.3" +then throw "sedlex is not available for OCaml ${ocaml.version}" +else + +let + DerivedCoreProperties = fetchurl { + url = "https://www.unicode.org/Public/12.1.0/ucd/DerivedCoreProperties.txt"; + sha256 = "0s6sn1yr9qmb2i6gf8dir2zpsbjv1frdfzy3i2yjylzvf637msx6"; + }; + DerivedGeneralCategory = fetchurl { + url = "https://www.unicode.org/Public/12.1.0/ucd/extracted/DerivedGeneralCategory.txt"; + sha256 = "1rifzq9ba6c58dn0lrmcb5l5k4ksx3zsdkira3m5p6h4i2wriy3q"; + }; + PropList = fetchurl { + url = "https://www.unicode.org/Public/12.1.0/ucd/PropList.txt"; + sha256 = "0gsb1jpj3mnqbjgbavi4l95gl6g4agq58j82km22fdfg63j3w3fk"; + }; +in +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-sedlex-${version}"; + version = "2.1"; + + src = fetchFromGitHub { + owner = "ocaml-community"; + repo = "sedlex"; + rev = "v${version}"; + sha256 = "05f6qa8x3vhpdz1fcnpqk37fpnyyq13icqsk2gww5idjnh6kng26"; + }; + + buildInputs = [ ocaml findlib dune ppx_tools_versioned ocaml-migrate-parsetree ]; + + propagatedBuildInputs = [ gen uchar ]; + + preBuild = '' + ln -s ${DerivedCoreProperties} src/generator/data/DerivedCoreProperties.txt + ln -s ${DerivedGeneralCategory} src/generator/data/DerivedGeneralCategory.txt + ln -s ${PropList} src/generator/data/PropList.txt + ''; + + buildFlags = [ "build" ]; + + installPhase = '' + make INSTALL_ARGS="--prefix=$out --libdir=$OCAMLFIND_DESTDIR" install + ''; + + createFindlibDestdir = true; + + dontStrip = true; + + meta = { + homepage = https://github.com/ocaml-community/sedlex; + description = "An OCaml lexer generator for Unicode"; + license = stdenv.lib.licenses.mit; + inherit (ocaml.meta) platforms; + maintainers = [ stdenv.lib.maintainers.marsam ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 4d956c494c05..96603d3a495a 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -839,6 +839,8 @@ let sedlex = callPackage ../development/ocaml-modules/sedlex { }; + sedlex_2 = callPackage ../development/ocaml-modules/sedlex/2.nix { }; + sodium = callPackage ../development/ocaml-modules/sodium { }; spelll = callPackage ../development/ocaml-modules/spelll { }; From f19f50b6ea90a6b594576d3ef1d9077f0e15565d Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 18 Jan 2020 16:21:00 -0500 Subject: [PATCH 2/2] flow: 0.114.0 -> 0.116.1 --- pkgs/development/tools/analysis/flow/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/development/tools/analysis/flow/default.nix b/pkgs/development/tools/analysis/flow/default.nix index ecd8f3a17ec9..2d2c3b0274d7 100644 --- a/pkgs/development/tools/analysis/flow/default.nix +++ b/pkgs/development/tools/analysis/flow/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "flow"; - version = "0.114.0"; + version = "0.116.1"; src = fetchFromGitHub { owner = "facebook"; repo = "flow"; rev = "refs/tags/v${version}"; - sha256 = "1dkp3v898b5vd0a9fl5xknwbbqv23v0icqml8ypyhzrv6wz5qiy3"; + sha256 = "19j2zw8ajky04d2ayfzj99yz805igip1ql3i4v7bblamc8sk38cn"; }; installPhase = '' @@ -16,14 +16,14 @@ stdenv.mkDerivation rec { install -Dm644 resources/shell/bash-completion $out/share/bash-completion/completions/flow ''; - buildInputs = (with ocamlPackages; [ ocaml findlib ocamlbuild dtoa core_kernel sedlex ocaml_lwt lwt_log lwt_ppx ppx_deriving ppx_gen_rec ppx_tools_versioned visitors wtf8 ocaml-migrate-parsetree ]) + buildInputs = (with ocamlPackages; [ ocaml findlib ocamlbuild dtoa core_kernel sedlex_2 ocaml_lwt lwt_log lwt_ppx ppx_deriving ppx_gen_rec ppx_tools_versioned visitors wtf8 ocaml-migrate-parsetree ]) ++ stdenv.lib.optionals stdenv.isDarwin [ CoreServices ]; patches = [ - # Fix List.compare labeled argument. Remove when https://github.com/facebook/flow/pull/8191 is merged + # Fix List.compare labeled argument. Remove with the next release (fetchpatch { - url = "https://github.com/facebook/flow/commit/1625664ec7290d4128587d96cb878571751f8881.patch"; - sha256 = "18fan0d2xa6z4ilbr7ha3vhnfqlr2s6mb02sgpv8ala99b0mcgmn"; + url = "https://github.com/facebook/flow/commit/d061b38042327d8241fb6dec7c8307c86b2f23d6.patch"; + sha256 = "1rmkb1zldgm2y2n32nm2xd8c7wk3hccsbljjz6bm6a0yixa6w77l"; }) ];