ysyx-workbench/abstract-machine/default.nix
tracer-ysyx 20030dc8d5 > 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
 01:03:00  up  10:38,  2 users,  load average: 0.20, 0.16, 0.66
2024-03-26 01:03:00 +08:00

26 lines
414 B
Nix

{ stdenv,
lib,
cmake,
SDL2,
isa ? "native",
platform ? "NEMU"
}:
stdenv.mkDerivation {
pname = "abstract-machine";
version = "2024.02.18";
src = ./.;
cmakeFlags = [
(lib.cmakeFeature "ISA" isa)
(lib.cmakeBool "__PLATFORM_${lib.strings.toUpper platform}__" true)
];
nativeBuildInputs = [
cmake
];
buildInputs = [
] ++ (if platform=="native" then [ SDL2 ] else [ ]);
}