ysyx-workbench/abstract-machine/default.nix

31 lines
483 B
Nix
Raw Normal View History

{ stdenv,
2024-03-25 09:29:46 +00:00
lib,
cmake,
SDL2,
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 = ./.;
cmakeFlags = [
(lib.cmakeFeature "ISA" isa)
] ++ map (p: (lib.cmakeBool "__PLATFORM_${lib.strings.toUpper p}__" true)) platform;
2024-03-25 09:29:46 +00:00
cmakeBuildType = "Debug";
dontStrip = true;
2024-03-25 09:29:46 +00:00
nativeBuildInputs = [
cmake
];
buildInputs = [
] ++ (if isa=="native" then [ SDL2 ] else [ ]);
doCheck = true;
2024-03-25 09:29:46 +00:00
}