> compile NEMU
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:44:49 up 4 days 3:50, 2 users, load average: 0.87, 0.78, 0.82
This commit is contained in:
parent
e974d8c439
commit
a4cdd926ae
1 changed files with 0 additions and 49 deletions
49
flake.nix
49
flake.nix
|
@ -64,45 +64,6 @@
|
|||
];
|
||||
};
|
||||
|
||||
packages.am-kernels = pkgs.stdenv.mkDerivation rec {
|
||||
pname = "am-kernels";
|
||||
version = "2024.02.18";
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
SDL2
|
||||
];
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "NJU-ProjectN";
|
||||
repo = "am-kernels";
|
||||
rev = "bb725d6f8223dd7de831c3b692e8c4531e9d01af";
|
||||
hash = "sha256-ZHdrw28TN8cMvhhzM469OV7cp0Yp+8yao855HP4+P4A=";
|
||||
};
|
||||
|
||||
AM_HOME = pkgs.fetchFromGitHub {
|
||||
owner = "xinyangli";
|
||||
repo = "abstract-machine";
|
||||
rev = "788595aac61c6b2f3b78ca8aa7d08dc33911bca4";
|
||||
hash = "sha256-YvWHIBP9tz3HL2TyibftvvQrpkWUDPnviCF4oyLmdjg=";
|
||||
};
|
||||
|
||||
ARCH = "native";
|
||||
|
||||
patchPhase = ''
|
||||
sed -i 's/\/bin\/echo/echo/' tests/cpu-tests/Makefile
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
AS=$CC make -C tests/cpu-tests BUILD_DIR=$(pwd)/build ARCH=$ARCH
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
rm -r build/native/src build/native/tests
|
||||
cp -r build/native/* $out/bin/
|
||||
'';
|
||||
};
|
||||
|
||||
packages.am-kernels-rv32 = crossPkgs.stdenv.mkDerivation rec {
|
||||
pname = "am-kernels-rv32";
|
||||
version = "2024.02.18";
|
||||
|
@ -157,16 +118,6 @@
|
|||
self.packages.${system}.nemu
|
||||
];
|
||||
};
|
||||
|
||||
devShells.abstract-machine-shell = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
clang-tools
|
||||
cmake
|
||||
check
|
||||
pkg-config
|
||||
SDL2
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue