Skip to content

Commit 6bd5549

Browse files
authored
Merge pull request #42 from katrinafyi/gtirb_semantics_rpc
update gtirb_semantics to use separate rpc library
2 parents 0b1a339 + 4b52e6b commit 6bd5549

File tree

5 files changed

+51
-6
lines changed

5 files changed

+51
-6
lines changed

.github/workflows/update.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
matrix:
1818
pkg: [asli, bap-asli-plugin, bap-primus, basil, gtirb-semantics,
1919
asl-translator, alive2-aslp, alive2-regehr, aslp_web, compiler-explorer,
20-
aslp-cpp, aslp-server
20+
aslp-cpp, aslp-server, aslp_client_server_ocaml
2121
]
2222

2323
runs-on: ubuntu-24.04

aslp/aslp_client_server_ocaml.nix

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{ lib
2+
, fetchFromGitHub
3+
, buildDunePackage
4+
# ocamlPackages
5+
, lwt
6+
, mtime
7+
, aslp
8+
}:
9+
10+
buildDunePackage {
11+
pname = "aslp_client_server_ocaml";
12+
version = "0-unstable-2025-02-03";
13+
14+
minimalOCamlVersion = "5.0";
15+
16+
src = fetchFromGitHub {
17+
owner = "UQ-PAC";
18+
repo = "aslp-rpc";
19+
rev = "de0567e45af766e03795a757a5a6198efa59d3fe";
20+
hash = "sha256-Qcn+UmB0SGXUDOCwHkipW857RfYxM6YMfSZJM7uFcF8=";
21+
};
22+
23+
checkInputs = [ ];
24+
nativeCheckInputs = [ ];
25+
buildInputs = [ ];
26+
nativeBuildInputs = [ ];
27+
propagatedBuildInputs = [ aslp lwt mtime ];
28+
29+
doCheck = true;
30+
31+
outputs = [ "out" "dev" ];
32+
33+
passthru = { };
34+
35+
meta = {
36+
homepage = "https://github.com/UQ-PAC/aslp-rpc";
37+
description = "RPC connectors for aslp for OCaml and C++ (OCaml Unix socket server component)";
38+
maintainers = with lib.maintainers; [ katrinafyi ];
39+
};
40+
}

aslp/overlay.nix

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ final: prev:
66
inherit (final.ocamlPackages_pac) aslp asli;
77
inherit (final.ocamlPackages_pac_5) aslp_web;
88
inherit (final.ocamlPackages_pac_5) aslp-server;
9+
inherit (final.ocamlPackages_pac_5) aslp_client_server_ocaml;
910

1011
overlay_ocamlPackages = ofinal: oprev: {
1112
asli = ofinal.callPackage ./asli.nix { inherit (final) z3; ocaml_z3 = ofinal.z3; };
@@ -16,6 +17,7 @@ final: prev:
1617

1718
zarith_stubs_js_0_17 = ofinal.callPackage ./zarith_stubs_js.nix { };
1819
aslp_web = ofinal.callPackage ./aslp_web.nix { zarith_stubs_js = ofinal.zarith_stubs_js_0_17; };
20+
aslp_client_server_ocaml = ofinal.callPackage ./aslp_client_server_ocaml.nix { };
1921

2022
mlbdd = ofinal.callPackage ./mlbdd.nix { };
2123
cohttp = oprev.cohttp.overrideAttrs (p: rec {

gtirb/gtirb-semantics.nix

+7-5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
, python3Packages
1515
, python-gtirb
1616
, gtirb-semantics
17+
, aslp_client_server_ocaml
1718
}:
1819

1920
let
@@ -34,16 +35,17 @@ buildDunePackage {
3435
pname = "gtirb_semantics";
3536
version = "0-unstable-2024-12-19";
3637

37-
src = fetchFromGitHub {
38-
owner = "UQ-PAC";
38+
src =
39+
fetchFromGitHub {
40+
owner = "uq-pac";
3941
repo = "gtirb-semantics";
40-
rev = "3044b50fadf54d441e80d68d8fb1f15b28906fb3";
41-
sha256 = "sha256-zCP9oQ1T9SUiHLoDDPyyzjGGVTOGpJMoosOunc5EK+g=";
42+
rev = "caching";
43+
hash = "sha256-kyptRpD3D0ZyTGVI0To3gfdek7V+p/ZgtohEiSI0ZDk=";
4244
};
4345

4446
buildInputs = [ python' asli ocaml-hexstring ocaml-protoc-plugin yojson ];
4547
nativeBuildInputs = [ protobuf ocaml-protoc-plugin ];
46-
propagatedBuildInputs = [ base64 ];
48+
propagatedBuildInputs = [ base64 aslp_client_server_ocaml];
4749

4850
postInstall = ''
4951
ln -sv ${wrapper}/bin/* $out/bin/gtirb-semantics-nix

update.py

+1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ class Args:
9696
Package('compiler-explorer', 'ailrst/compiler-explorer', 'main'),
9797
Package('aslp-server', 'UQ-PAC/aslp-rpc'),
9898
Package('aslp-cpp', 'UQ-PAC/aslp-rpc'),
99+
Package('aslp_client_server_ocaml', 'UQ-PAC/aslp-rpc'),
99100
]
100101
# NOTE: also change files in ./.github/workflows/*.yml
101102

0 commit comments

Comments
 (0)