diff --git a/flake.nix b/flake.nix index 990d66d..6656094 100644 --- a/flake.nix +++ b/flake.nix @@ -17,7 +17,7 @@ }; in { - packages.nemu = pkgs.callPackage ./nemu {}; + packages.nemu = pkgs.callPackage ./nemu { am-kernels = self.packages.${system}.am-kernels; }; packages.am-kernels = crossPkgs.stdenv.mkDerivation rec { pname = "am-kernels"; diff --git a/nemu/Makefile b/nemu/Makefile index 928f973..55d36f1 100644 --- a/nemu/Makefile +++ b/nemu/Makefile @@ -95,4 +95,4 @@ integration-tests: $(IMAGES) test: unit-tests integration-tests @$(OBJ_DIR)/tests/expr_test -.PHONY: test integration-tests \ No newline at end of file +.PHONY: test integration-tests unit-tests \ No newline at end of file diff --git a/nemu/default.nix b/nemu/default.nix index 162a77a..e97588e 100644 --- a/nemu/default.nix +++ b/nemu/default.nix @@ -23,10 +23,11 @@ stdenv.mkDerivation rec { ]; checkInputs = [ + pkgs.check am-kernels ]; - IMAGES_PATH = "${am-kernels}/share/images" + IMAGES_PATH = "${am-kernels}/share/images"; configurePhase = '' export NEMU_HOME=$(pwd) @@ -37,6 +38,7 @@ stdenv.mkDerivation rec { make ''; + doCheck = true; checkPhase = '' make test ''; diff --git a/result b/result index 172ba27..88d0079 120000 --- a/result +++ b/result @@ -1 +1 @@ -/nix/store/d0jlcjdrgsb5pis8flyy5ihifdnfhms5-am-kernels-riscv32-none-elf-2024.02.18 \ No newline at end of file +/nix/store/g0h98bppypvyz3z4sv45kl9218ad2gsq-nemu-2024-03-02 \ No newline at end of file