mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-21 20:49:52 +03:00
Merge pull request #127123 from AndersonTorres/new-commanderx16
This commit is contained in:
commit
ed6c2b1c42
39
pkgs/misc/emulators/commanderx16/run.nix
Normal file
39
pkgs/misc/emulators/commanderx16/run.nix
Normal 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?)
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user