Added open-simh

This commit is contained in:
2023-09-10 23:07:42 +02:00
parent 42c64247ab
commit 0edaeb8e0a

View File

@@ -1,4 +1,5 @@
{
# vim: set et,sw=4
description = "Flake utils demo";
inputs.flake-utils.url = "github:numtide/flake-utils";
@@ -9,6 +10,40 @@
{
packages = rec {
performous-composer = pkgs.libsForQt5.callPackage ./performous-composer.nix {};
open-simh = pkgs.stdenv.mkDerivation {
pname = "open-simh";
version = "4.0.0";
src = pkgs.fetchFromGitHub {
owner = "open-simh";
repo = "simh";
rev = "d4f85d01bdf7301d5f7a2c4e51c3a84024561b26";
sha256 = "sha256-kjLX8JeG7nPNz7KLheQCKz8kKA1xPn0CpRg+N336r1w=";
};
postPatch = ''
${pkgs.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 = with pkgs; [
libpcap
vde2
pcre
libedit
SDL2 SDL2_ttf
libpng
zlib
freetype
pkg-config
dejavu_fonts
];
nativeBuildInputs = [ pkgs.cmake pkgs.ninja ];
};
};
apps = rec {
hello = flake-utils.lib.mkApp { drv = self.packages.${system}.hello; };