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

flake.lock: update for dune 3.17 #50

Merged
merged 23 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5581d83
flake.lock: Update
katrinafyi Feb 6, 2025
9f72e80
llvmPackages_git: remove override after nixpkgs update
katrinafyi Feb 6, 2025
a7af911
gtirb: 2.2.0 -> 2.2.0-unstable-2025-01-24
katrinafyi Feb 6, 2025
8ca8b6b
aslp_web: 0-unstable-2024-09-05 -> 0-unstable-2025-02-05
katrinafyi Feb 6, 2025
b81e40b
aslp_offline_js: init at 0-unstable-2025-02-05, and add to aslp_web
katrinafyi Feb 6, 2025
737b330
ddisasm,gtirb-pprinter: use boost183 to fix build error
katrinafyi Feb 6, 2025
3248bd8
alive2-aslp: pin to antlr4_12
katrinafyi Feb 6, 2025
010d96f
alive2-aslp: tag-aslp-before-upstream-squash-unstable-2025-01-14 -> t…
katrinafyi Feb 6, 2025
829de54
retdec5,retdec-uq-pac: add -includestring
katrinafyi Feb 6, 2025
c0ccd2e
llvm-custom-git: fix llvmPackages override
katrinafyi Feb 6, 2025
eb9bec9
ddisasm: use souffle compiled with clang
katrinafyi Feb 6, 2025
b712a45
aslp_offline_js: do not propagate ocaml deps
katrinafyi Feb 7, 2025
eca7000
retdec: use char32_t as WideCharType
katrinafyi Feb 7, 2025
9a062f6
aslp_offline_js: nuke references in source maps
katrinafyi Feb 7, 2025
4064305
aslp_web: 0-unstable-2025-02-05 -> 0-unstable-2025-02-07
katrinafyi Feb 7, 2025
01cef44
aslp_web: nuke references
katrinafyi Feb 7, 2025
7956eab
ci: upload failed build logs as artifact
katrinafyi Feb 7, 2025
be4936b
ci: upload build directory of failed builds
katrinafyi Feb 10, 2025
f2320ef
retdec: use gcc
katrinafyi Feb 10, 2025
4f4efe0
souffle: add vla patch
katrinafyi Feb 10, 2025
7d91b84
souffle: pin to gcc until macos/clang issues are fixed
katrinafyi Feb 11, 2025
b532d19
retdec: mark as broken on macos
katrinafyi Feb 11, 2025
5224d97
ci: use chmod for macos compatibility
katrinafyi Feb 11, 2025
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
20 changes: 19 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
echo NIXPKGS_ALLOW_BROKEN="$("$broken" && echo 1 || echo 0)" > "$GITHUB_ENV"
id: broken

- run: ./nix-cached.sh build --impure -L .#${{matrix.pkg}}
- run: ./nix-cached.sh build --impure -L .#${{matrix.pkg}} --keep-failed
id: build
continue-on-error: ${{ fromJSON(steps.broken.outputs.bool) }}

Expand All @@ -99,6 +99,24 @@ jobs:
if: ${{ fromJSON(steps.broken.outputs.bool) }}
- run: ls -l

- if: failure()
run: |
mkdir _logs && cd _logs && cp -v /nix/var/log/nix/drvs/*/* .
bunzip2 *.bz2 || true

for f in *.drv; do mv -- "$f" "$f.txt"; done

sudo cp -R /tmp/nix-build-* . || true
sudo chmod -R a+rw . || true

ls -l .

- if: failure() && ! fromJSON(steps.broken.outputs.bool)
uses: actions/upload-artifact@v4
with:
name: nix-build-failed-${{ matrix.os }}-${{ matrix.pkg }}
path: _logs

result:
if: ${{ always() }}
runs-on: ubuntu-24.04
Expand Down
45 changes: 45 additions & 0 deletions aslp/aslp_offline_js.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{ lib
, ocaml
, fetchFromGitHub
, buildDunePackage
, nukeReferences
# pkgs
# ocamlPackages
, asli
, aslp_web
, zarith_stubs_js
, js_of_ocaml
, js_of_ocaml-ppx
# for testing
, testers
, aslp_offline
}:

buildDunePackage {
pname = "aslp_offline_js";
version = aslp_web.version;

minimalOCamlVersion = "5.0";

src = aslp_web.src;

checkInputs = [ ];
nativeCheckInputs = [ ];
buildInputs = [ aslp_offline js_of_ocaml zarith_stubs_js js_of_ocaml-ppx ];
nativeBuildInputs = [ js_of_ocaml nukeReferences ];
propagatedBuildInputs = [ ];

doCheck = true;

outputs = [ "out" "dev" ];

postInstall = ''
find "$out" -name '*.map' -exec nuke-refs '{}' +
'';

meta = {
homepage = "https://github.com/katrinafyi/aslp-web";
description = "AArch64 lifter generated by ASLp by offline partial evaluation (compiled to Javascript)";
maintainers = with lib.maintainers; [ katrinafyi ];
};
}
18 changes: 12 additions & 6 deletions aslp/aslp_web.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,29 @@
, fetchFromGitHub
, buildDunePackage
, nix-gitignore
, nukeReferences
, asli
, aslp_offline_js
, js_of_ocaml
, js_of_ocaml-ppx
, js_of_ocaml-compiler
, zarith_stubs_js
, zarith_stubs_js
, nodejs-slim
, python3
}:

buildDunePackage rec {
pname = "aslp_web";
version = "0-unstable-2024-09-05";
version = "0-unstable-2025-02-07";

buildInputs = [ asli js_of_ocaml js_of_ocaml-ppx zarith_stubs_js ];
nativeBuildInputs = [ python3 js_of_ocaml-compiler nodejs-slim ];
buildInputs = [ asli js_of_ocaml js_of_ocaml-ppx zarith_stubs_js aslp_offline_js ];
nativeBuildInputs = [ python3 js_of_ocaml-compiler nodejs-slim nukeReferences ];

src = fetchFromGitHub {
owner = "katrinafyi";
repo = "aslp-web";
rev = "a774047588e45fb51bec1ad38c5476dc5638ded5";
hash = "sha256-BO8ydUnYUDS1z+jjXYAcf0NBiUv22Dt8jr4BvaWO3e8=";
rev = "7064561055881a6e09d1b00f6ea82bb406d9ec65";
hash = "sha256-WVR9vhUnQIR2rQVzfNF4+xJJ4Tqxi4HcyDlFG2MgUNA=";
};

postPatch = ''
Expand All @@ -34,6 +36,10 @@ buildDunePackage rec {
substituteAllInPlace web/index.html
'';

postInstall = ''
find "$out" -type f ! -name dune-package -exec nuke-refs '{}' +
'';

meta = {
homepage = "https://github.com/katrinafyi/aslp-web";
description = "aslp on the web";
Expand Down
4 changes: 3 additions & 1 deletion aslp/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ final: prev:
inherit (final.ocamlPackages_pac_5) aslp-server;
inherit (final.ocamlPackages_pac_5) aslp_client_server_ocaml;
inherit (final.ocamlPackages_pac_5) aslp_offline;
inherit (final.ocamlPackages_pac_5) aslp_offline_js;

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


aslp_offline = ofinal.callPackage ./aslp_offline.nix {};
aslp_offline = ofinal.callPackage ./aslp_offline.nix { };
aslp_offline_js = ofinal.callPackage ./aslp_offline_js.nix { zarith_stubs_js = ofinal.zarith_stubs_js_0_17; };

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; };
Expand Down
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gtirb/ddisasm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
, fetchFromGitHub
, fetchzip
, cmake
, boost
, boost183
, lief
, libehp
, gtirb
Expand Down Expand Up @@ -40,7 +40,7 @@ in stdenv.mkDerivation {
})
] ++ lib.optional stdenv.isDarwin ./0001-ddisasm-disable-concurrent-souffle.patch;

buildInputs = [ cmake boost lief gtirb gtirb-pprinter libehp ];
buildInputs = [ cmake boost183 lief gtirb gtirb-pprinter libehp ];
nativeBuildInputs = [ capstone-grammatech souffle ];

cmakeFlags = [ "-DDDISASM_ENABLE_TESTS=OFF" "-DDDISASM_GENERATE_MANY=ON" ];
Expand Down
6 changes: 3 additions & 3 deletions gtirb/gtirb-pprinter.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
, fetchFromGitHub
, cmake
, python3
, boost
, boost183
, abseil-cpp
, doxygen
, gtirb
Expand Down Expand Up @@ -31,12 +31,12 @@ stdenv.mkDerivation {
)
'';

buildInputs = [ cmake python3 gtirb boost abseil-cpp gtest ];
buildInputs = [ cmake python3 gtirb boost183 abseil-cpp gtest ];
nativeBuildInputs = [ capstone-grammatech ];

cmakeFlags = [ "-DGTIRB_PPRINTER_ENABLE_TESTS=OFF" ];
CXXFLAGS= [
"-includecstdint"
"-includecstdint"
"-includeset"
"-Wno-error=unused-result"
"-Wno-error=deprecated-declarations"
Expand Down
12 changes: 6 additions & 6 deletions gtirb/gtirb.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
, fetchFromGitHub
, cmake
, python3
, boost
, boost183
, protobuf
, doxygen
}:

stdenv.mkDerivation {
pname = "gtirb";
version = "2.2.0";
version = "2.2.0-unstable-2025-01-24";

src = fetchFromGitHub {
owner = "GrammaTech";
repo = "gtirb";
rev = "v2.2.0";
hash = "sha256-dzkVwQ7MvVm4KUX/Lo03yd1P9OHj+q1/kp4ZpdO8NDk=";
rev = "9b27239b4a9155cdd4a902f3cccbeb4b2e324b63";
hash = "sha256-P8waGCuDHXbUxafrSVYk/JvC3cwKk89B9733AphbH08=";
};

patches = [
Expand All @@ -35,7 +35,7 @@ stdenv.mkDerivation {
'';

nativeBuildInputs = [ ];
buildInputs = [ cmake python3 boost doxygen ];
buildInputs = [ cmake python3 boost183 doxygen ];
propagatedBuildInputs = [ protobuf ];

cmakeFlags = [
Expand All @@ -49,7 +49,7 @@ stdenv.mkDerivation {
preConfigure = ''
substituteInPlace CMakeLists.txt \
--replace-warn '$'{PYTHON_VERSION} ${python3.version}

substituteInPlace src/CMakeLists.txt src/gtirb/proto/CMakeLists.txt \
--replace-fail 'DESTINATION lib' 'DESTINATION ''${CMAKE_INSTALL_LIBDIR}' \
--replace-warn 'DESTINATION include' 'DESTINATION ''${CMAKE_INSTALL_INCLUDEDIR}'
Expand Down
16 changes: 15 additions & 1 deletion gtirb/overlay.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
final: prev:
{
lief-0-13-2 = prev.callPackage ./lief-0-13-2.nix { python = final.python3; };
ddisasm = prev.callPackage ./ddisasm.nix { lief = final.lief-0-13-2; };

souffle =
# clang 19 failure re atomics: https://github.com/souffle-lang/souffle/issues/2530
(prev.souffle.override { stdenv = final.gccStdenv; })
.overrideAttrs (p: {
patches = (p.patches or []) ++ final.lib.optional final.stdenv.cc.isClang (final.fetchpatch {
# clang 19 failure + patch: https://github.com/souffle-lang/souffle/pull/2529
url = "https://github.com/rina-forks/souffle/commit/2fb4d065a.patch";
hash = "sha256-NnZtTTlXa33EHWXnoPyVeHifIzlSyOdWh859j0+MwHg=";
});
});

ddisasm = prev.callPackage ./ddisasm.nix {
lief = final.lief-0-13-2;
};
ddisasm-deterministic = prev.ddisasm.deterministic;

gtirb = prev.callPackage ./gtirb.nix { };
Expand Down
6 changes: 3 additions & 3 deletions llvm-translator/alive2-aslp.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@

(alive2.override { inherit llvmPackages; }).overrideAttrs (prev: {
pname = "alive2-aslp";
version = "tag-aslp-before-upstream-squash-unstable-2025-01-14";
version = "tag-aslp-before-upstream-squash-unstable-2025-02-05";

buildInputs = prev.buildInputs ++ [ aslp-cpp antlr.runtime.cpp ];
nativeBuildInputs = prev.nativeBuildInputs ++ [ jre makeWrapper ];

src = fetchFromGitHub {
owner = "katrinafyi";
repo = "alive2";
rev = "78657f9693767952ffad6a9901421dd820386b41";
hash = "sha256-Sp6+H5SP6gTEY5z0D+nykW4hvMUBGc+RdD5kDTv3tSM=";
rev = "e6fcb5aacce5791b74522fc037d76e5901f18ed1";
hash = "sha256-UpWOXR9sjUVG5ZtIHD8YHF3F3pS5joDI+ikDJEsGtxs=";
};

patches = [ ]; # undoing patch needed for upstream alive2
Expand Down
5 changes: 5 additions & 0 deletions llvm-translator/retdec5.nix
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ stdenv.mkDerivation (self: {
--replace-fail /usr/local/bin/gtime ${time}
substituteInPlace scripts/retdec-unpacker.py \
--replace-fail "'upx'" "'${upx}'"

substituteInPlace include/retdec/utils/string.h --replace-fail 'WideCharType = std::uint32_t' 'WideCharType = char32_t'
'';

# build first to make sure YARA_DIR has u+w permissions?
Expand Down Expand Up @@ -292,5 +294,8 @@ stdenv.mkDerivation (self: {
homepage = "https://retdec.com";
license = licenses.mit;
maintainers = with maintainers; [ katrinafyi ];

# "missing char_traits for unsigned int"
broken = stdenv.isDarwin;
};
})
38 changes: 20 additions & 18 deletions overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let
ocamlPackages_pac_5 = final.ocamlPackages.overrideScope final.overlay_ocamlPackages
// { _overlay = final.overlay_ocamlPackages; };

# llvm-translator packages
# llvm-translator packages
overlay_ocamlPackages = ofinal: oprev: {
# ctypes and ctypes-foreign v0.22.0 do not build on macOS
ctypes = oprev.ctypes.overrideAttrs (old: {
Expand All @@ -33,13 +33,13 @@ let
ctypes = ofinal.ctypes;
});

ocaml-llvm-14 = ofinal.callPackage ./llvm-translator/ocaml-llvm.nix {
libllvm = final.llvmPackages_14.libllvm;
ctypes = ofinal.ctypes;
ctypes-foreign = ofinal.ctypes-foreign ;
ocaml-llvm-14 = ofinal.callPackage ./llvm-translator/ocaml-llvm.nix {
libllvm = final.llvmPackages_14.libllvm;
ctypes = ofinal.ctypes;
ctypes-foreign = ofinal.ctypes-foreign ;
};
asl-translator = ofinal.callPackage ./llvm-translator/asl-translator.nix {
llvm = ofinal.ocaml-llvm-14;
asl-translator = ofinal.callPackage ./llvm-translator/asl-translator.nix {
llvm = ofinal.ocaml-llvm-14;
};
};
inherit (final.ocamlPackages_pac) asl-translator;
Expand All @@ -50,17 +50,18 @@ let
llvm-custom-15 = prev.callPackage ./llvm-translator/llvm-custom.nix { llvmPackages = final.llvmPackages_15; };
llvm-custom-18 = prev.callPackage ./llvm-translator/llvm-custom.nix { llvmPackages = final.llvmPackages_18; };
llvm-custom-git = prev.callPackage ./llvm-translator/llvm-custom.nix {
llvmPackages = final.llvmPackages_git.override (p: {
gitRelease =
prev.lib.throwIfNot
(prev.lib.versionOlder prev.llvmPackages_git.llvm.version "20.0.0-unstable-2024-11-15")
"llvmPackages_git seems to have updated, is this override no longer needed?"
{
rev = "35710ab392b50c815765f03c12409147502dfb86";
rev-version = "20.0.0-unstable-2024-11-15";
sha256 = "sha256-n3YpwHT/ptCKgrDLqsZJb60/MZhUJk+g889APhAz9a8=";
};
});
llvmPackages = final.llvmPackages_git;
# .override (p: {
# gitRelease =
# prev.lib.throwIfNot
# (prev.lib.versionOlder prev.llvmPackages_git.llvm.version "20.0.0-unstable-2024-11-15")
# "llvmPackages_git seems to have updated, is this override no longer needed?"
# {
# rev = "35710ab392b50c815765f03c12409147502dfb86";
# rev-version = "20.0.0-unstable-2024-11-15";
# sha256 = "sha256-n3YpwHT/ptCKgrDLqsZJb60/MZhUJk+g889APhAz9a8=";
# };
# });
};

alive2 = prev.callPackage ./llvm-translator/alive2.nix {
Expand All @@ -71,6 +72,7 @@ let
};
alive2-aslp = prev.callPackage ./llvm-translator/alive2-aslp.nix {
llvmPackages = final.llvm-custom-git;
antlr = final.antlr4_12;
};
xed2022 = prev.xed.overrideAttrs rec {
version = "2022.08.11";
Expand Down
Loading