From 2cf2146e6493a6e0756d27eb0736a532a0d4f85c Mon Sep 17 00:00:00 2001 From: Moritz Sanft <58110325+msanft@users.noreply.github.com> Date: Sun, 7 Apr 2024 22:28:00 +0200 Subject: [PATCH] supermodel: init at 0-unstable-2024-04-05 --- pkgs/by-name/su/supermodel/package.nix | 64 ++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 pkgs/by-name/su/supermodel/package.nix diff --git a/pkgs/by-name/su/supermodel/package.nix b/pkgs/by-name/su/supermodel/package.nix new file mode 100644 index 000000000000..27b9f633a661 --- /dev/null +++ b/pkgs/by-name/su/supermodel/package.nix @@ -0,0 +1,64 @@ +{ fetchFromGitHub +, lib +, libGLU +, SDL2 +, SDL2_net +, stdenv +, zlib +}: + +stdenv.mkDerivation rec { + pname = "supermodel"; + version = "0-unstable-2024-04-05"; + + src = fetchFromGitHub { + owner = "trzy"; + repo = "supermodel"; + rev = "250f84e78eba381adf8cd731ce20b1b9be43c8c8"; + hash = "sha256-3sDtNMW5R5Eq9GXJzKs0mQdiLUIWl6+4+rzKg8xpqEY="; + }; + + buildInputs = [ + libGLU + SDL2 + SDL2_net + zlib + ]; + + env.NIX_CFLAGS_COMPILE = "-Wno-error=format-security"; + + makefile = "Makefiles/Makefile.UNIX"; + + makeFlags = [ "NET_BOARD=1" ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + mkdir -p $out/share/supermodel + cp bin/* $out/bin + cp -r Config Assets $out/share/supermodel + + runHook postInstall + ''; + + meta = { + description = "A Sega Model 3 Arcade Emulator"; + homepage = "https://github.com/trzy/supermodel"; + license = lib.licenses.gpl3; + longDescription = '' + Supermodel requires specific files to be present in the $HOME directory of + the user running the emulator. To ensure these files are present, move the + configuration and assets as follows: + + cp $out/share/supermodel/Config/Supermodel.ini ~/.config/supermodel/Config/Supermodel.ini + cp -r $out/share/supermodel/Assets/* ~/.local/share/supermodel/Assets/ + + Then the emulator can be started with: + supermodel -game-xml-file=$out/share/supermodel/Config/Games.xml /path/to/romset. + ''; + mainProgram = "supermodel"; + maintainers = with lib.maintainers; [ msanft ]; + platforms = lib.platforms.linux; + }; +}