xinyangli
b403f8a40b
All checks were successful
Build abstract machine with nix / build-packages (abstract-machine) (push) Successful in 17s
Build abstract machine with nix / build-packages (nemu) (push) Successful in 8s
Build abstract machine with nix / build-packages (nemu-lib) (push) Successful in 7s
Build abstract machine with nix / build-packages (rv32Cross.abstract-machine) (push) Successful in 12s
Build npc tests / npc-build (flow) (push) Successful in 8s
Build npc tests / npc-build (flow-simlib) (push) Successful in 10s
31 lines
487 B
Nix
31 lines
487 B
Nix
{ stdenv
|
|
, lib
|
|
, cmake
|
|
, SDL2
|
|
, glibc
|
|
, isa ? "native"
|
|
, platform ? [ ]
|
|
}:
|
|
stdenv.mkDerivation {
|
|
pname = "abstract-machine";
|
|
version = "2024.06.01";
|
|
|
|
src = ./.;
|
|
|
|
cmakeFlags = [
|
|
(lib.cmakeFeature "ISA" isa)
|
|
] ++ map (p: (lib.cmakeBool "__PLATFORM_${lib.strings.toUpper p}__" true)) platform;
|
|
|
|
cmakeBuildType = "Debug";
|
|
dontStrip = true;
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
];
|
|
|
|
buildInputs = [
|
|
|
|
] ++ (if isa == "native" then [ SDL2 ] else [ ]);
|
|
|
|
doCheck = true;
|
|
}
|