ysyx-workbench/abstract-machine/default.nix
2024-07-09 17:26:11 +08:00

27 lines
434 B
Nix

{ stdenv,
lib,
cmake,
SDL2,
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;
nativeBuildInputs = [
cmake
];
buildInputs = [
] ++ (if isa=="native" then [ SDL2 ] else [ ]);
doCheck = true;
}