Skip to content
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
4 changes: 4 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@
libffi
];
};
llvm_cheri = pkgs.mkShell {
name = "llvm_cheri";
packages = with lowrisc_pkgs; [llvm_cheri];
};
};
formatter = pkgs.alejandra;
});
Expand Down
5 changes: 4 additions & 1 deletion lib/pyprojectOverrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@
hatchling = [];
hatch-fancy-pypi-readme = [];
};
jsonschema2md.poetry-core = [];
jsonschema2md = {
poetry-core = [];
babel = [];
};
libcst.setuptools = [];
libcst.setuptools-rust = [];
libusb1.setuptools = [];
Expand Down
3 changes: 3 additions & 0 deletions pkgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@

verilator_caliptra = pkgs.callPackage ./verilator_caliptra.nix {inherit inputs;};

# Cheri
llvm_cheri = pkgs.callPackage ./llvm_cheri.nix {};

# IT packages
gcsfuse = pkgs.callPackage ./gcsfuse {};
gcs-fuse-csi-driver-sidecar-mounter = pkgs.callPackage ./gcs-fuse-csi-driver-sidecar-mounter.nix {inherit gcsfuse;};
Expand Down
41 changes: 41 additions & 0 deletions pkgs/llvm_cheri.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright lowRISC contributors.
#
# SPDX-License-Identifier: MIT
{
fetchzip,
stdenv,
zlib,
zstd,
ncurses6,
autoPatchelfHook,
}:
stdenv.mkDerivation rec {
name = "cheri-llvm";
version = "17.0.1.r01";
src = fetchzip {
# We build the toolchain in another repository because derivations doesn't allow internet
# connection, which is required by cheribuild.
url = "https://github.com/engdoreis/cheribuild/releases/download/v${version}/cheri-std093-sdk.tar.gz";
hash = "sha256-/6FGm1Ot9sFZ71FIThtLV2KFjhSfnc5w32OucCZmDfc=";
};

dontConfigure = true;
dontBuild = true;

buildInputs = [
stdenv.cc.cc.lib
ncurses6
zlib
zstd
];
nativeBuildInputs = [autoPatchelfHook];

installPhase = ''
mkdir -p $out
cp -R ./cheri-std093-sdk/* $out
'';

meta = {
platforms = ["x86_64-linux"];
};
}