49 lines
959 B
Nix
49 lines
959 B
Nix
{ stdenv, fetchFromGitHub
|
|
, libpcap
|
|
, vde2
|
|
, pcre
|
|
, libedit
|
|
, SDL2
|
|
, SDL2_ttf
|
|
, libpng
|
|
, zlib
|
|
, freetype
|
|
, pkg-config
|
|
, dejavu_fonts
|
|
, ed
|
|
, cmake, ninja }:
|
|
stdenv.mkDerivation {
|
|
pname = "open-simh";
|
|
version = "4.0.0";
|
|
src = fetchFromGitHub {
|
|
owner = "open-simh";
|
|
repo = "simh";
|
|
rev = "d4f85d01bdf7301d5f7a2c4e51c3a84024561b26";
|
|
sha256 = "sha256-kjLX8JeG7nPNz7KLheQCKz8kKA1xPn0CpRg+N336r1w=";
|
|
};
|
|
postPatch = ''
|
|
${ed}/bin/ed BESM6/CMakeLists.txt <<'_EOF_'
|
|
/foreach (fdir \''${cand_fontdirs})/
|
|
i
|
|
string(REPLACE " " ";" extra_cand_fontdirs "$ENV{buildInputs} $ENV{nativeBuildInputs}")
|
|
foreach(extra_fdir IN LISTS extra_cand_fontdirs)
|
|
list(APPEND cand_fontdirs ''${extra_fdir})
|
|
endforeach()
|
|
.
|
|
wq
|
|
_EOF_'';
|
|
buildInputs = [
|
|
libpcap
|
|
vde2
|
|
pcre
|
|
libedit
|
|
SDL2 SDL2_ttf
|
|
libpng
|
|
zlib
|
|
freetype
|
|
pkg-config
|
|
dejavu_fonts
|
|
];
|
|
nativeBuildInputs = [ cmake ninja ];
|
|
}
|