2024-12-06 22:40:52 +00:00
|
|
|
{ pkgs, stdenv, riscv-pkgs }:
|
2024-12-06 19:44:09 +00:00
|
|
|
pkgs.gcc13Stdenv.mkDerivation rec {
|
|
|
|
pname = "rve";
|
|
|
|
version = "0.1.0";
|
|
|
|
|
|
|
|
dontPatch = true;
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
patchShebangs bin/*.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
installFlags = "PREFIX=${placeholder "out"} VERSION=${version}";
|
|
|
|
|
|
|
|
nativeBuildInputs = with pkgs; [ pkg-config cmake ninja ];
|
|
|
|
|
2024-12-06 22:40:52 +00:00
|
|
|
buildInputs = with pkgs; [
|
|
|
|
gdb
|
|
|
|
linuxPackages.perf
|
|
|
|
jq
|
|
|
|
lcov
|
|
|
|
#riscv-pkgs.buildPackages.gcc
|
|
|
|
pkgsCross.riscv32-embedded.buildPackages.gcc
|
|
|
|
pkgsCross.riscv32-embedded.buildPackages.binutils
|
2024-12-08 23:32:45 +00:00
|
|
|
pkgsCross.riscv32-embedded.buildPackages.gdb
|
2024-12-15 13:50:18 +00:00
|
|
|
sail-riscv-rv32
|
|
|
|
(python3.withPackages (ps: with ps; [
|
|
|
|
riscof
|
|
|
|
]))
|
2024-12-06 22:40:52 +00:00
|
|
|
];
|
2024-12-06 19:44:09 +00:00
|
|
|
|
|
|
|
hardeningDisable = [ "all" ];
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE"
|
|
|
|
"-DCMAKE_BUILD_TYPE=Debug"
|
|
|
|
];
|
|
|
|
shellHook = ''
|
|
|
|
export CMAKE_BUILD_TYPE=Debug
|
|
|
|
ln -s build/compile_commands.json compile_commands.json
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
src = ./.;
|
|
|
|
|
|
|
|
}
|