mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 23:36:17 +01:00
Merge pull request #43440 from vbgl/ocaml-lwt_log-1.0.0
ocamlPackages.lwt_log: init at 1.0.0
This commit is contained in:
commit
ebdb6edad7
5 changed files with 40 additions and 18 deletions
|
@ -1,6 +1,8 @@
|
|||
{ stdenv, fetchzip, pkgconfig, ncurses, libev, jbuilder
|
||||
, ocaml, findlib, camlp4, cppo
|
||||
, ocaml, findlib, cppo
|
||||
, ocaml-migrate-parsetree, ppx_tools_versioned, result
|
||||
, withP4 ? !stdenv.lib.versionAtLeast ocaml.version "4.07"
|
||||
, camlp4 ? null
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
@ -13,12 +15,13 @@ stdenv.mkDerivation rec {
|
|||
};
|
||||
|
||||
preConfigure = ''
|
||||
ocaml src/util/configure.ml -use-libev true -use-camlp4 true
|
||||
ocaml src/util/configure.ml -use-libev true -use-camlp4 ${if withP4 then "true" else "false"}
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ ncurses ocaml findlib jbuilder camlp4 cppo
|
||||
ocaml-migrate-parsetree ppx_tools_versioned ];
|
||||
buildInputs = [ ncurses ocaml findlib jbuilder cppo
|
||||
ocaml-migrate-parsetree ppx_tools_versioned ]
|
||||
++ stdenv.lib.optional withP4 camlp4;
|
||||
propagatedBuildInputs = [ libev result ];
|
||||
|
||||
installPhase = ''
|
||||
|
|
24
pkgs/development/ocaml-modules/lwt_log/default.nix
Normal file
24
pkgs/development/ocaml-modules/lwt_log/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ stdenv, ocaml, findlib, jbuilder, lwt }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.0.0";
|
||||
name = "ocaml${ocaml.version}-lwt_log-${version}";
|
||||
|
||||
inherit (lwt) src;
|
||||
|
||||
buildInputs = [ ocaml findlib jbuilder ];
|
||||
|
||||
propagatedBuildInputs = [ lwt ];
|
||||
|
||||
buildPhase = "jbuilder build -p lwt_log";
|
||||
|
||||
inherit (jbuilder) installPhase;
|
||||
|
||||
meta = {
|
||||
description = "Lwt logging library (deprecated)";
|
||||
homepage = "https://github.com/aantron/lwt_log";
|
||||
license = stdenv.lib.licenses.lgpl21;
|
||||
inherit (ocaml.meta) platforms;
|
||||
maintainers = [ stdenv.lib.maintainers.vbgl ];
|
||||
};
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
{ stdenv, fetchFromGitHub, lib, ocaml, libelf, cf-private, CoreServices,
|
||||
findlib, camlp4, sedlex, ocamlbuild, lwt_ppx, wtf8, dtoa }:
|
||||
{ stdenv, fetchFromGitHub, lib, ocamlPackages, libelf, cf-private, CoreServices }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -14,21 +13,15 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "0r3yl4m7dhm1h4c431zp8hd2gg6k1d9bwd2371xav5q7hviwmjl6";
|
||||
};
|
||||
|
||||
# lwt.log is being split out into a separate package, so this can be
|
||||
# removed once nixpkgs is updated.
|
||||
# See https://github.com/ocsigen/lwt/issues/453#issuecomment-352897664
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile --replace lwt_log lwt.log
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp bin/flow $out/bin/
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
ocaml libelf findlib camlp4 sedlex ocamlbuild lwt_ppx wtf8 dtoa
|
||||
] ++ optionals stdenv.isDarwin [ cf-private CoreServices ];
|
||||
buildInputs = [ libelf
|
||||
] ++ (with ocamlPackages; [
|
||||
ocaml findlib camlp4 sedlex ocamlbuild lwt_ppx lwt_log wtf8 dtoa
|
||||
]) ++ optionals stdenv.isDarwin [ cf-private CoreServices ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A static type checker for JavaScript";
|
||||
|
|
|
@ -8100,8 +8100,6 @@ with pkgs;
|
|||
flow = callPackage ../development/tools/analysis/flow {
|
||||
inherit (darwin.apple_sdk.frameworks) CoreServices;
|
||||
inherit (darwin) cf-private;
|
||||
inherit (ocamlPackages) ocaml findlib camlp4 sedlex ocamlbuild lwt_ppx
|
||||
wtf8 dtoa;
|
||||
};
|
||||
|
||||
foreman = callPackage ../tools/system/foreman { };
|
||||
|
|
|
@ -392,6 +392,10 @@ let
|
|||
|
||||
ocaml_lwt = if lib.versionOlder "4.02" ocaml.version then lwt3 else lwt2;
|
||||
|
||||
lwt_log = callPackage ../development/ocaml-modules/lwt_log {
|
||||
lwt = lwt3;
|
||||
};
|
||||
|
||||
lwt_ppx = callPackage ../development/ocaml-modules/lwt/ppx.nix {
|
||||
lwt = lwt3;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue