2024-01-11 09:14:41 +00:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
nur-xin = {
|
|
|
|
url = "git+https://git.xinyang.life/xin/nur.git";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = { self, ... }@inputs: with inputs;
|
|
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system} //
|
|
|
|
{ nur.xin = nur-xin.legacyPackages.${system}; };
|
|
|
|
in
|
|
|
|
{
|
|
|
|
devShells.default = with pkgs; mkShell {
|
|
|
|
packages = [
|
|
|
|
clang-tools
|
|
|
|
rnix-lsp
|
2024-01-11 09:36:00 +00:00
|
|
|
bear
|
2024-01-11 09:14:41 +00:00
|
|
|
|
|
|
|
gdb
|
|
|
|
jre
|
|
|
|
|
|
|
|
gtkwave
|
|
|
|
];
|
|
|
|
|
2024-01-11 09:29:23 +00:00
|
|
|
inputsFrom = [ self.packages.${system}.nemu ];
|
2024-01-11 09:14:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
packages.nemu = with pkgs; stdenv.mkDerivation rec {
|
|
|
|
pname = "nemu";
|
|
|
|
version = "2024-01-02";
|
|
|
|
|
|
|
|
src = ./.;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
gnumake
|
|
|
|
flex
|
|
|
|
bison
|
2024-01-13 02:38:20 +00:00
|
|
|
pkg-config
|
|
|
|
python3 # for testing
|
2024-01-11 09:14:41 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2024-01-13 02:38:20 +00:00
|
|
|
check
|
2024-01-11 09:14:41 +00:00
|
|
|
readline
|
|
|
|
libllvm
|
|
|
|
];
|
|
|
|
|
|
|
|
NEMU_HOME = src;
|
|
|
|
|
|
|
|
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; [ ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|