2024-04-13 13:15:56 +00:00
|
|
|
{ stdenv,
|
2024-03-25 09:29:46 +00:00
|
|
|
lib,
|
|
|
|
cmake,
|
|
|
|
SDL2,
|
|
|
|
isa ? "native",
|
2024-04-13 13:15:56 +00:00
|
|
|
platform ? [ ]
|
2024-03-25 09:29:46 +00:00
|
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "abstract-machine";
|
|
|
|
version = "2024.02.18";
|
|
|
|
|
|
|
|
src = ./.;
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
(lib.cmakeFeature "ISA" isa)
|
2024-04-13 13:15:56 +00:00
|
|
|
] ++ map (p: (lib.cmakeBool "__PLATFORM_${lib.strings.toUpper p}__" true)) platform;
|
2024-03-25 09:29:46 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
|
2024-04-13 13:15:56 +00:00
|
|
|
] ++ (if isa=="native" then [ SDL2 ] else [ ]);
|
|
|
|
|
|
|
|
doCheck = true;
|
2024-03-25 09:29:46 +00:00
|
|
|
}
|