ysyx-workbench/abstract-machine/default.nix

35 lines
568 B
Nix
Raw Normal View History

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)
] ++ 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 = [
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 [ ]);
doCheck = true;
2024-03-25 09:29:46 +00:00
}