2024-08-15 03:56:34 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, cmake
|
|
|
|
, SDL2
|
|
|
|
, glibc
|
|
|
|
, isa ? "native"
|
|
|
|
, 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 = ./.;
|
|
|
|
|
2024-08-15 03:56:34 +00:00
|
|
|
cmakeFlags = [
|
2024-03-25 09:29:46 +00:00
|
|
|
(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
|
|
|
|
2024-07-25 08:47:29 +00:00
|
|
|
cmakeBuildType = "Debug";
|
|
|
|
dontStrip = true;
|
|
|
|
|
2024-03-25 09:29:46 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
|
2024-08-15 03:56:34 +00:00
|
|
|
] ++ (if isa == "native" then [ SDL2 ] else [ ]);
|
2024-08-15 08:13:42 +00:00
|
|
|
propagatedBuildInputs = [
|
2024-08-15 07:52:51 +00:00
|
|
|
|
|
|
|
] ++ (if isa == "native" then [ SDL2 ] else [ ]);
|
|
|
|
|
2024-04-13 13:15:56 +00:00
|
|
|
doCheck = true;
|
2024-03-25 09:29:46 +00:00
|
|
|
}
|