2023-04-29 16:46:19 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, SDL_compat, libX11, libXext }:
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "rvvm";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "0.5";
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "LekKit";
|
|
|
|
repo = "RVVM";
|
2023-04-29 16:46:19 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-1wAKijRYB0FGBe4cSHUynkO4ePVG4QvVIgSoWzNbqtE=";
|
2023-02-02 18:25:31 +00:00
|
|
|
};
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
buildInputs = if stdenv.isDarwin then [ SDL_compat ] else [ libX11 libXext ];
|
2023-02-02 18:25:31 +00:00
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
buildFlags = [ "all" "lib" ];
|
|
|
|
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ]
|
2023-02-02 18:25:31 +00:00
|
|
|
# work around https://github.com/NixOS/nixpkgs/issues/19098
|
|
|
|
++ lib.optional (stdenv.cc.isClang && stdenv.isDarwin) "CFLAGS=-fno-lto";
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/LekKit/RVVM";
|
|
|
|
description = "The RISC-V Virtual Machine";
|
|
|
|
license = with licenses; [ gpl3 /* or */ mpl20 ];
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2023-10-09 19:29:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "rvvm";
|
2023-02-02 18:25:31 +00:00
|
|
|
};
|
|
|
|
}
|