ysyx-workbench/abstract-machine/default.nix
xinyangli 1f3e64bb37
All checks were successful
Build abstract machine with nix / build-packages (abstract-machine) (push) Successful in 16s
Build abstract machine with nix / build-packages (nemu) (push) Successful in 7s
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 7s
Build npc tests / npc-build (flow-simlib) (push) Successful in 9s
am,build: fix typo
2024-08-15 16:13:42 +08:00

34 lines
568 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 [ ]);
propagatedBuildInputs = [
] ++ (if isa == "native" then [ SDL2 ] else [ ]);
doCheck = true;
}