ysyx-workbench/nemu/default.nix
tracer-ysyx 20c8c52468 > compile NEMU
ysyx_22040000 李心杨
Linux calcite 6.6.18 #1-NixOS SMP PREEMPT_DYNAMIC Fri Feb 23 08:25:28 UTC 2024 x86_64 GNU/Linux
 12:06:16  up 1 day 15:34,  2 users,  load average: 0.31, 0.44, 0.46
2024-03-06 12:06:16 +08:00

55 lines
844 B
Nix

{ pkgs,
lib,
stdenv,
am-kernels
}:
stdenv.mkDerivation rec {
pname = "nemu";
version = "2024-03-02";
src = ./.;
nativeBuildInputs = with pkgs; [
gnumake
flex
bison
];
buildInputs = with pkgs; [
check
readline
libllvm
];
checkInputs = [
am-kernels
];
IMAGES_PATH = "${am-kernels}/share/images"
configurePhase = ''
export NEMU_HOME=$(pwd)
make alldefconfig
'';
buildPhase = ''
make
'';
checkPhase = ''
make test
'';
installPhase = ''
mkdir -p $out/bin
make PREFIX=$out install
'';
meta = with lib; {
description = "NJU EMUlator, a full system x86/mips32/riscv32/riscv64 emulator for teaching";
homepage = "https://github.com/NJU-ProjectN/nemu.git";
license = with licenses; [ ];
maintainers = with maintainers; [ ];
};
}