Separated open-simh into its own repo

This commit is contained in:
2023-09-14 12:50:03 +02:00
parent 0edaeb8e0a
commit 3d6a77f551
2 changed files with 49 additions and 36 deletions

View File

@@ -10,44 +10,9 @@
{
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 ];
};
open-simh = pkgs.callPackage ./open-simh.nix {};
};
apps = rec {
hello = flake-utils.lib.mkApp { drv = self.packages.${system}.hello; };
default = hello;
};
}
);

48
open-simh.nix Normal file
View File

@@ -0,0 +1,48 @@
{ 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 ];
}