diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2021-01-03 10:14:22 +0100 |
---|---|---|
committer | Vincent Laporte <vbgl@users.noreply.github.com> | 2021-01-07 07:43:29 +0100 |
commit | 331186b9ac7edc9e9aea1fc692da8880a549e33f (patch) | |
tree | b7a945411cf1055b0e2553ce7dccd1e6e214e463 /pkgs/development/ocaml-modules | |
parent | 6e57c2b876582ac3aeeab32d9927dbe6b623e6ec (diff) | |
download | nixlib-331186b9ac7edc9e9aea1fc692da8880a549e33f.tar nixlib-331186b9ac7edc9e9aea1fc692da8880a549e33f.tar.gz nixlib-331186b9ac7edc9e9aea1fc692da8880a549e33f.tar.bz2 nixlib-331186b9ac7edc9e9aea1fc692da8880a549e33f.tar.lz nixlib-331186b9ac7edc9e9aea1fc692da8880a549e33f.tar.xz nixlib-331186b9ac7edc9e9aea1fc692da8880a549e33f.tar.zst nixlib-331186b9ac7edc9e9aea1fc692da8880a549e33f.zip |
ocamlPackages.bitstring: 3.1.1 → 4.0.1
ocamlPackages.ppx_bitsring: init at 4.0.1
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r-- | pkgs/development/ocaml-modules/bap/default.nix | 7 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/bitstring/default.nix | 13 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/bitstring/ppx.nix | 18 |
3 files changed, 31 insertions, 7 deletions
diff --git a/pkgs/development/ocaml-modules/bap/default.nix b/pkgs/development/ocaml-modules/bap/default.nix index 66b1dd67a9f2..e860ad13d405 100644 --- a/pkgs/development/ocaml-modules/bap/default.nix +++ b/pkgs/development/ocaml-modules/bap/default.nix @@ -2,6 +2,7 @@ , ocaml, findlib, ocamlbuild, ocaml_oasis, bitstring, camlzip, cmdliner, core_kernel, ezjsonm, fileutils, ocaml_lwt, ocamlgraph, ocurl, re, uri, zarith, piqi, piqi-ocaml, uuidm, llvm, frontc, ounit, ppx_jane, parsexp, utop, libxml2, + ppx_bitstring, ppx_tools_versioned, which, makeWrapper, writeText , z3 @@ -40,7 +41,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ which makeWrapper ]; buildInputs = [ ocaml findlib ocamlbuild ocaml_oasis - llvm ppx_tools_versioned + llvm ppx_bitstring ppx_tools_versioned z3 utop libxml2 ]; @@ -63,6 +64,10 @@ stdenv.mkDerivation rec { patches = [ ./dont-add-curses.patch ]; + preConfigure = '' + substituteInPlace oasis/elf --replace bitstring.ppx ppx_bitstring + ''; + configureFlags = [ "--enable-everything ${disableIda}" "--with-llvm-config=${llvm}/bin/llvm-config" ]; BAPBUILDFLAGS = "-j $(NIX_BUILD_CORES)"; diff --git a/pkgs/development/ocaml-modules/bitstring/default.nix b/pkgs/development/ocaml-modules/bitstring/default.nix index 386503039e05..583017d9ddec 100644 --- a/pkgs/development/ocaml-modules/bitstring/default.nix +++ b/pkgs/development/ocaml-modules/bitstring/default.nix @@ -1,20 +1,21 @@ -{ stdenv, fetchFromGitHub, buildDunePackage, ppx_tools_versioned, ounit }: +{ lib, fetchFromGitHub, buildDunePackage, stdlib-shims }: buildDunePackage rec { pname = "bitstring"; - version = "3.1.1"; + version = "4.0.1"; + + useDune2 = true; src = fetchFromGitHub { owner = "xguerin"; repo = pname; rev = "v${version}"; - sha256 = "1ys8xx174jf8v5sm0lbxvzhdlcs5p0fhy1gvf58gad2g4gvgpvxc"; + sha256 = "1z7jmgljvp52lvn3ml2cp6gssxqp4sikwyjf6ym97cycbcw0fjjm"; }; - buildInputs = [ ppx_tools_versioned ounit ]; - doCheck = true; + propagatedBuildInputs = [ stdlib-shims ]; - meta = with stdenv.lib; { + meta = with lib; { description = "This library adds Erlang-style bitstrings and matching over bitstrings as a syntax extension and library for OCaml"; homepage = "https://github.com/xguerin/bitstring"; license = licenses.lgpl21Plus; diff --git a/pkgs/development/ocaml-modules/bitstring/ppx.nix b/pkgs/development/ocaml-modules/bitstring/ppx.nix new file mode 100644 index 000000000000..ee0a8c51f732 --- /dev/null +++ b/pkgs/development/ocaml-modules/bitstring/ppx.nix @@ -0,0 +1,18 @@ +{ lib, buildDunePackage, ocaml +, bitstring, ppxlib +, ounit +}: + +buildDunePackage rec { + pname = "ppx_bitstring"; + inherit (bitstring) version useDune2 src; + + buildInputs = [ bitstring ppxlib ]; + + doCheck = lib.versionAtLeast ocaml.version "4.08"; + checkInputs = [ ounit ]; + + meta = bitstring.meta // { + description = "Bitstrings and bitstring matching for OCaml - PPX extension"; + }; +} |