Merge pull request #127123 from AndersonTorres/new-commanderx16

This commit is contained in:
Sandro 2021-06-18 12:05:22 +02:00 committed by GitHub
commit ed6c2b1c42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 45 additions and 2 deletions

View file

@ -0,0 +1,39 @@
{ lib
, stdenv
, runtimeShell
, symlinkJoin
, writeTextFile
}:
{ emulator, rom }:
assert emulator.version == rom.version;
let
runScript = writeTextFile {
name = "run-x16";
text = ''
#!${runtimeShell}
defaultRom="${rom}/share/x16-rom/rom.bin"
exec "${emulator}/bin/x16emu" -rom $defaultRom "$@"
'';
executable = true;
destination = "/bin/run-x16";
};
in
symlinkJoin {
name = "run-x16-${emulator.version}";
paths = [
emulator
rom
runScript
];
}
# TODO [ AndersonTorres ]:
# 1. Parse the command line in order to allow the user to set an optional
# rom-file
# 2. generate runScript based on symlinkJoin (maybe a postBuild?)

View file

@ -31620,8 +31620,12 @@ in
yapesdl = callPackage ../misc/emulators/yapesdl { };
x16-emulator = callPackage ../misc/emulators/commander-x16/emulator.nix { };
x16-rom = callPackage ../misc/emulators/commander-x16/rom.nix { };
x16-emulator = callPackage ../misc/emulators/commanderx16/emulator.nix { };
x16-rom = callPackage ../misc/emulators/commanderx16/rom.nix { };
x16-run = (callPackage ../misc/emulators/commanderx16/run.nix { }) {
emulator = x16-emulator;
rom = x16-rom;
};
bullet = callPackage ../development/libraries/bullet {
inherit (darwin.apple_sdk.frameworks) Cocoa OpenGL;