diff --git a/basil/planter.nix b/basil/planter.nix index 372e83b..c599953 100644 --- a/basil/planter.nix +++ b/basil/planter.nix @@ -76,7 +76,7 @@ let gts="''${args[4]}" ${gcc-aarch64.targetPrefix}"$compiler" ''${CFLAGS:-} "$in" -o "$out" - ddisasm-deterministic "$out" --ir "$gtirb" + ddisasm "$out" --ir "$gtirb" proto-json.py "$gtirb" "$gtirb" -s8 --idem gtirb-semantics "$gtirb" "$gts" proto-json.py "$gts" "$gts" --idem diff --git a/gtirb/capstone-grammatech.nix b/gtirb/capstone-grammatech.nix index 5b79e9a..ebf9d69 100644 --- a/gtirb/capstone-grammatech.nix +++ b/gtirb/capstone-grammatech.nix @@ -6,12 +6,13 @@ capstone.overrideAttrs { pname = "capstone-grammatech"; + version = "5.0.1-unstable-2024-04-30"; src = fetchFromGitHub { owner = "GrammaTech"; repo = "capstone"; - rev = "a11159a0bbd680e134c53d6a16e304b53488824b"; - hash = "sha256-0aCmlXsrdWYlxqzRlXj8TNkD0s8xHMTq0YlVJ+t1fD4="; + rev = "30a4ecf01b43abed8527d0d84c1ea182e6e3da8b"; + hash = "sha256-JWw+S2IIBxTxDrdBlu3OqiMZ13y0T1bC2jpUDC3Mn5M="; }; preConfigure = '' diff --git a/gtirb/ddisasm.nix b/gtirb/ddisasm.nix index e93cdaf..9c3c1d6 100644 --- a/gtirb/ddisasm.nix +++ b/gtirb/ddisasm.nix @@ -1,5 +1,6 @@ { lib , stdenv +, fetchurl , fetchFromGitHub , cmake , boost @@ -10,41 +11,37 @@ , capstone-grammatech , souffle , ddisasm -, makeWrapper -, runCommand , runCommandCC -, unrandom , testers , jq }: stdenv.mkDerivation { pname = "ddisasm"; - version = "unstable-2024-03-08"; + version = "0-unstable-2024-10-31"; src = fetchFromGitHub { owner = "GrammaTech"; repo = "ddisasm"; - rev = "9edfe9fe86910ef946de1db7a7ac41ce86bc31d0"; - hash = "sha256-xFW6J3jCCMtUqT25/zVfjjy5o3MoX1HXxIlRhjM6s8A="; + rev = "17396b59537aaff73e2c7657ccd3b3eb2c3b6a04"; + hash = "sha256-yFZ0QR1upmTzEyATsTM5bGPr0EPWxkyXKbGa5nYSEIE="; }; + patches = [ + (fetchurl { + url = "https://github.com/rina-forks/ddisasm/compare/main..determinism.patch"; + hash = "sha256-xISyR7ptR2LfHZJAGUyXqANLIab9yZrQFh8wLbJLsx8="; + }) + ]; + buildInputs = [ cmake boost lief gtirb gtirb-pprinter libehp ]; nativeBuildInputs = [ capstone-grammatech souffle ]; cmakeFlags = [ "-DDDISASM_ENABLE_TESTS=OFF" "-DDDISASM_GENERATE_MANY=ON" ]; - CXXFLAGS = "-includeset"; + CXXFLAGS = [ "-includeset" ]; - passthru.deterministic = - runCommand - (ddisasm.name + "-deterministic") - { nativeBuildInputs = [ makeWrapper ]; } - '' - makeWrapper ${lib.getExe ddisasm} $out/bin/ddisasm-deterministic \ - --inherit-argv0 \ - --suffix LD_PRELOAD : ${lib.getLib unrandom}/lib/*.so - ''; + passthru.deterministic = ddisasm; passthru.tests.ddisasm = testers.testVersion { package = ddisasm; @@ -59,8 +56,8 @@ stdenv.mkDerivation { mkdir -p $out && cd $out echo 'int main(void) { return 0; }' > a.c $CC a.c - ddisasm-deterministic a.out --json | jq -S > a1 - ddisasm-deterministic a.out --json | jq -S > a2 + ddisasm a.out --json | jq -S > a1 + ddisasm a.out --json | jq -S > a2 diff -q a1 a2 ''; diff --git a/gtirb/gtirb-pprinter.nix b/gtirb/gtirb-pprinter.nix index 5ca1880..2edd043 100644 --- a/gtirb/gtirb-pprinter.nix +++ b/gtirb/gtirb-pprinter.nix @@ -13,23 +13,26 @@ stdenv.mkDerivation { pname = "gtirb-pprinter"; - version = "2.1.0"; + version = "2.2.0-unstable-2024-10-09"; src = fetchFromGitHub { owner = "GrammaTech"; repo = "gtirb-pprinter"; - rev = "v2.1.0"; - hash = "sha256-zgYq6FKxaJ6vLzvOTCfOU4ZUyXvMuFc3abNrqg8NADc="; + rev = "762a287f3d12c6aac3d3d000cdc8bf20f5ee34f2"; + hash = "sha256-9CZ+ndHX5f4rKbGXvCrqEg55Ep9JEkS/u//grdqTpTc="; }; buildInputs = [ cmake python3 gtirb boost abseil-cpp gtest ]; nativeBuildInputs = [ capstone-grammatech ]; cmakeFlags = [ "-DGTIRB_PPRINTER_ENABLE_TESTS=OFF" ]; - - preConfigure = '' - export CXXFLAGS='-includecstdint -includeset -Wno-error=unused-result -Wno-error=deprecated-declarations -Wno-error=array-bounds' - ''; + CXXFLAGS= [ + "-includecstdint" + "-includeset" + "-Wno-error=unused-result" + "-Wno-error=deprecated-declarations" + "-Wno-error=array-bounds" + ]; meta = { homepage = "https://github.com/grammatech/gtirb-pprinter"; diff --git a/gtirb/gtirb.nix b/gtirb/gtirb.nix index e7a6db8..702a9f5 100644 --- a/gtirb/gtirb.nix +++ b/gtirb/gtirb.nix @@ -1,5 +1,6 @@ { lib , stdenv +, fetchurl , fetchFromGitHub , cmake , python3 @@ -10,15 +11,22 @@ stdenv.mkDerivation { pname = "gtirb"; - version = "2.0.0"; + version = "2.2.0"; src = fetchFromGitHub { owner = "GrammaTech"; repo = "gtirb"; - rev = "v2.0.0"; - hash = "sha256-ueoqxm6iXv4JgzR/xkImT+O8xx+7bA2upx1TJ828LLA="; + rev = "v2.2.0"; + hash = "sha256-dzkVwQ7MvVm4KUX/Lo03yd1P9OHj+q1/kp4ZpdO8NDk="; }; + patches = [ + (fetchurl { + url = "https://github.com/rina-forks/gtirb/compare/master..det.patch"; + hash = "sha256-86cRmnV5CL5DjOzFj+cJYUYKQpHQ6DsqnZDaMGa/kog="; + }) + ]; + nativeBuildInputs = [ ]; buildInputs = [ cmake python3 boost doxygen ]; propagatedBuildInputs = [ protobuf ];