Merge pull request #222652 from Alizter/ps/branch/ocamlpackages_cohttp_static_handler__init_at_0_15_0

ocamlPackages.magic-trace: init at 1.1.0
This commit is contained in:
Vincent Laporte 2023-03-23 22:20:30 +01:00 committed by GitHub
commit b9831fe22c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 63 additions and 9 deletions

View File

@ -254,6 +254,15 @@ with self;
propagatedBuildInputs = [ async_websocket cohttp-async ppx_jane uri-sexp ];
};
cohttp_static_handler = janePackage {
duneVersion = "3";
pname = "cohttp_static_handler";
version = "0.15.0";
hash = "sha256-ENaH8ChvjeMc9WeNIhkeNBB7YK9vB4lw95o6FFZI1ys=";
meta.description = "A library for easily creating a cohttp handler for static files";
propagatedBuildInputs = [ cohttp-async ];
};
core = janePackage {
pname = "core";
version = "0.15.1";

View File

@ -0,0 +1,27 @@
{ lib, fetchFromGitHub, buildDunePackage, async, cohttp_static_handler
, core_unix, owee, ppx_jane, shell }:
buildDunePackage rec {
pname = "magic-trace";
version = "1.1.0";
minimalOCamlVersion = "4.12";
duneVersion = "3";
src = fetchFromGitHub {
owner = "janestreet";
repo = "magic-trace";
rev = "v${version}";
sha256 = "sha256-615AOkrbQI6vRosA5Kz3Epipe9f9+Gs9+g3bVl5gzBY=";
};
buildInputs = [ async cohttp_static_handler core_unix owee ppx_jane shell ];
meta = with lib; {
description =
"Collects and displays high-resolution traces of what a process is doing";
license = licenses.mit;
maintainers = [ maintainers.alizter ];
homepage = "https://github.com/janestreet/magic-trace";
};
}

View File

@ -2,19 +2,20 @@
buildDunePackage rec {
minimalOCamlVersion = "4.06";
useDune2 = true;
duneVersion = "2";
pname = "owee";
version = "0.4";
version = "0.6";
src = fetchurl {
url = "https://github.com/let-def/owee/releases/download/v${version}/owee-${version}.tbz";
sha256 = "sha256:055bi0yfdki1pqagbhrwmfvigyawjgsmqw04zhpp6hds8513qzvb";
url =
"https://github.com/let-def/owee/releases/download/v${version}/owee-${version}.tbz";
sha256 = "sha256-GwXV5t4GYbDiGwyvQyW8NZoYvn4qXlLnjX331Bj1wjM=";
};
meta = {
meta = with lib; {
description = "An experimental OCaml library to work with DWARF format";
homepage = "https://github.com/let-def/owee/";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.vbgl ];
license = licenses.mit;
maintainers = with maintainers; [ vbgl alizter ];
};
}

View File

@ -6,8 +6,7 @@ lib.throwIfNot (lib.versionAtLeast "4.12" ocaml.version)
buildDunePackage rec {
pname = "spacetime_lib";
version = "0.3.0";
useDune2 = true;
duneVersion = "2";
src = fetchFromGitHub {
owner = "lpw25";
@ -16,6 +15,8 @@ buildDunePackage rec {
sha256 = "0biisgbycr5v3nm5jp8i0h6vq76vzasdjkcgh8yr7fhxc81jgv3p";
};
patches = [ ./spacetime.diff ];
propagatedBuildInputs = [ owee ];
preConfigure = ''

View File

@ -0,0 +1,14 @@
diff --git a/src/elf_locations.ml b/src/elf_locations.ml
index a08b359..0db9274 100644
--- a/src/elf_locations.ml
+++ b/src/elf_locations.ml
@@ -37,7 +37,8 @@ let resolve_from_dwarf t ~program_counter =
| Some section ->
let body = Owee_buf.cursor (Owee_elf.section_body t.map section) in
let rec aux () =
- match Owee_debug_line.read_chunk body with
+ let pointers_to_other_sections = Owee_elf.debug_line_pointers t.map t.sections in
+ match Owee_debug_line.read_chunk body ~pointers_to_other_sections with
| None -> ()
| Some (header, chunk) ->
(* CR-soon mshinwell: fix owee .mli to note that [state] is

View File

@ -895,6 +895,8 @@ let
magic-mime = callPackage ../development/ocaml-modules/magic-mime { };
magic-trace = callPackage ../development/ocaml-modules/magic-trace { };
mariadb = callPackage ../development/ocaml-modules/mariadb {
inherit (pkgs) mariadb;
};