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";
|
2024-07-09 09:26:11 +00:00
|
|
|
version = "2024.06.01";
|
2024-03-25 09:29:46 +00:00
|
|
|
|
|
|
|
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
|
|
|
}
|