am: build with nix
This commit is contained in:
parent
8545a92c1f
commit
2cc992a181
4 changed files with 50 additions and 41 deletions
26
abstract-machine/default.nix
Normal file
26
abstract-machine/default.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ stdenv,
|
||||
lib,
|
||||
cmake,
|
||||
SDL2,
|
||||
isa ? "native",
|
||||
platform ? "NEMU"
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "abstract-machine";
|
||||
version = "2024.02.18";
|
||||
|
||||
src = ./.;
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeFeature "ISA" isa)
|
||||
(lib.cmakeBool "__PLATFORM_${lib.strings.toUpper platform}__" true)
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
|
||||
] ++ (if platform=="native" then [ SDL2 ] else [ ]);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue