summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2020-01-20 21:27:06 -0500
committerGitHub <noreply@github.com>2020-01-20 21:27:06 -0500
commitf164e688a4ad2321a5a6ad9e08ec5419eb03c945 (patch)
tree21467e9a7e2008f983d1a859b634098b9b30912c /pkgs/development
parent3c26653bc3d70261c0b4abef3a3640b7a63a6eb6 (diff)
parentf19f50b6ea90a6b594576d3ef1d9077f0e15565d (diff)
downloadnixpkgs-f164e688a4ad2321a5a6ad9e08ec5419eb03c945.tar
nixpkgs-f164e688a4ad2321a5a6ad9e08ec5419eb03c945.tar.gz
nixpkgs-f164e688a4ad2321a5a6ad9e08ec5419eb03c945.tar.bz2
nixpkgs-f164e688a4ad2321a5a6ad9e08ec5419eb03c945.tar.lz
nixpkgs-f164e688a4ad2321a5a6ad9e08ec5419eb03c945.tar.xz
nixpkgs-f164e688a4ad2321a5a6ad9e08ec5419eb03c945.tar.zst
nixpkgs-f164e688a4ad2321a5a6ad9e08ec5419eb03c945.zip
Merge pull request #78005 from marsam/update-flow
flow: 0.114.0 -> 0.116.1
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/ocaml-modules/sedlex/2.nix69
-rw-r--r--pkgs/development/tools/analysis/flow/default.nix12
2 files changed, 75 insertions, 6 deletions
diff --git a/pkgs/development/ocaml-modules/sedlex/2.nix b/pkgs/development/ocaml-modules/sedlex/2.nix
new file mode 100644
index 00000000000..09390a27343
--- /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/development/tools/analysis/flow/default.nix b/pkgs/development/tools/analysis/flow/default.nix
index ecd8f3a17ec..2d2c3b0274d 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";
     })
   ];