Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update gtirb_semantics to use separate rpc library #42

Merged
merged 6 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
matrix:
pkg: [asli, bap-asli-plugin, bap-primus, basil, gtirb-semantics,
asl-translator, alive2-aslp, alive2-regehr, aslp_web, compiler-explorer,
aslp-cpp, aslp-server
aslp-cpp, aslp-server, aslp_client_server_ocaml
]

runs-on: ubuntu-24.04
Expand Down
40 changes: 40 additions & 0 deletions aslp/aslp_client_server_ocaml.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{ lib
, fetchFromGitHub
, buildDunePackage
# ocamlPackages
, lwt
, mtime
, aslp
}:

buildDunePackage {
pname = "aslp_client_server_ocaml";
version = "0-unstable-2025-02-03";

minimalOCamlVersion = "5.0";

src = fetchFromGitHub {
owner = "UQ-PAC";
repo = "aslp-rpc";
rev = "de0567e45af766e03795a757a5a6198efa59d3fe";
hash = "sha256-Qcn+UmB0SGXUDOCwHkipW857RfYxM6YMfSZJM7uFcF8=";
};

checkInputs = [ ];
nativeCheckInputs = [ ];
buildInputs = [ ];
nativeBuildInputs = [ ];
propagatedBuildInputs = [ aslp lwt mtime ];

doCheck = true;

outputs = [ "out" "dev" ];

passthru = { };

meta = {
homepage = "https://github.com/UQ-PAC/aslp-rpc";
description = "RPC connectors for aslp for OCaml and C++ (OCaml Unix socket server component)";
maintainers = with lib.maintainers; [ katrinafyi ];
};
}
2 changes: 2 additions & 0 deletions aslp/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ final: prev:
inherit (final.ocamlPackages_pac) aslp asli;
inherit (final.ocamlPackages_pac_5) aslp_web;
inherit (final.ocamlPackages_pac_5) aslp-server;
inherit (final.ocamlPackages_pac_5) aslp_client_server_ocaml;

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

zarith_stubs_js_0_17 = ofinal.callPackage ./zarith_stubs_js.nix { };
aslp_web = ofinal.callPackage ./aslp_web.nix { zarith_stubs_js = ofinal.zarith_stubs_js_0_17; };
aslp_client_server_ocaml = ofinal.callPackage ./aslp_client_server_ocaml.nix { };

mlbdd = ofinal.callPackage ./mlbdd.nix { };
cohttp = oprev.cohttp.overrideAttrs (p: rec {
Expand Down
12 changes: 7 additions & 5 deletions gtirb/gtirb-semantics.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
, python3Packages
, python-gtirb
, gtirb-semantics
, aslp_client_server_ocaml
}:

let
Expand All @@ -34,16 +35,17 @@ buildDunePackage {
pname = "gtirb_semantics";
version = "0-unstable-2024-12-19";

src = fetchFromGitHub {
owner = "UQ-PAC";
src =
fetchFromGitHub {
owner = "uq-pac";
repo = "gtirb-semantics";
rev = "3044b50fadf54d441e80d68d8fb1f15b28906fb3";
sha256 = "sha256-zCP9oQ1T9SUiHLoDDPyyzjGGVTOGpJMoosOunc5EK+g=";
rev = "caching";
hash = "sha256-kyptRpD3D0ZyTGVI0To3gfdek7V+p/ZgtohEiSI0ZDk=";
};

buildInputs = [ python' asli ocaml-hexstring ocaml-protoc-plugin yojson ];
nativeBuildInputs = [ protobuf ocaml-protoc-plugin ];
propagatedBuildInputs = [ base64 ];
propagatedBuildInputs = [ base64 aslp_client_server_ocaml];

postInstall = ''
ln -sv ${wrapper}/bin/* $out/bin/gtirb-semantics-nix
Expand Down
1 change: 1 addition & 0 deletions update.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class Args:
Package('compiler-explorer', 'ailrst/compiler-explorer', 'main'),
Package('aslp-server', 'UQ-PAC/aslp-rpc'),
Package('aslp-cpp', 'UQ-PAC/aslp-rpc'),
Package('aslp_client_server_ocaml', 'UQ-PAC/aslp-rpc'),
]
# NOTE: also change files in ./.github/workflows/*.yml

Expand Down
Loading