d08c2860da
ysyx_22040000 李心杨 Linux calcite 6.6.19 #1-NixOS SMP PREEMPT_DYNAMIC Fri Mar 1 12:35:11 UTC 2024 x86_64 GNU/Linux 16:26:21 up 4 days 3:32, 2 users, load average: 0.85, 0.91, 0.95
61 lines
988 B
Nix
61 lines
988 B
Nix
{ pkgs,
|
|
lib,
|
|
stdenv,
|
|
am-kernels
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "nemu";
|
|
version = "2024-03-02";
|
|
|
|
src = ./.;
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
gnumake
|
|
pkg-config
|
|
flex
|
|
bison
|
|
];
|
|
|
|
buildInputs = with pkgs; [
|
|
readline
|
|
libllvm
|
|
];
|
|
|
|
checkInputs = [
|
|
pkgs.check
|
|
am-kernels
|
|
];
|
|
|
|
configurePhase = ''
|
|
export NEMU_HOME=$(pwd)
|
|
make alldefconfig
|
|
'';
|
|
|
|
buildPhase = ''
|
|
make
|
|
'';
|
|
|
|
doCheck = true;
|
|
checkPhase = ''
|
|
export IMAGES_PATH=${am-kernels}/share/binary
|
|
make test
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
make PREFIX=$out install
|
|
'';
|
|
|
|
shellHook = ''
|
|
export NEMU_HOME=$(pwd)
|
|
export IMAGES_PATH=${am-kernels}/share/binary
|
|
'';
|
|
|
|
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; [ ];
|
|
};
|
|
}
|