Browse Source

docker build

master
Cadey Ratio 6 months ago
parent
commit
188d91a9ec
  1. 3
      .gitignore
  2. 44
      default.nix
  3. 22
      docker.nix
  4. 2
      src/pc/controller/controller_entry_point.c

3
.gitignore

@ -77,3 +77,6 @@ vblank
input
*.m64
.env
# Nix
/result

44
default.nix

@ -0,0 +1,44 @@
{ pkgs ? import <nixpkgs> { } }:
with pkgs;
stdenv.mkDerivation rec {
pname = "sm64pc";
version = "latest";
buildInputs = [
gnumake
python3
audiofile
pkg-config
SDL2
libusb1
glfw3
libgcc
xorg.libX11
xorg.libXrandr
libpulseaudio
alsaLib
glfw
libGL
unixtools.hexdump
clang_10
];
src = ./.;
buildPhase = ''
chmod +x ./extract_assets.py
make -j
'';
installPhase = ''
mkdir -p $out/bin
cp ./build/us_pc/sm64.us.f3dex2e $out/bin/sm64pc
'';
meta = with stdenv.lib; {
description = "Super Mario 64 PC port, requires rom :)";
license = licenses.unfree;
};
}

22
docker.nix

@ -0,0 +1,22 @@
{ pkgs ? import <nixpkgs> { } }:
with pkgs;
let
site = callPackage ./default.nix { };
dockerImage = pkg:
pkgs.dockerTools.buildLayeredImage {
name = "ghcr.io/xe/sm64pc";
tag = "latest";
contents = [ pkg mesa mesa.drivers mesa_glu mesa_noglu libGL_driver ];
config = {
Cmd = [ "${strace}/bin/strace" "${pkg}/bin/sm64pc" ];
Env = [ "LD_LIBRARY_PATH=/lib" "LIBGL_DRIVERS_PATH=/lib/dri" ];
WorkingDir = "/";
};
};
in dockerImage site

2
src/pc/controller/controller_entry_point.c

@ -9,7 +9,7 @@
static struct ControllerAPI *controller_implementations[] = {
&controller_recorded_tas,
&controller_gamebridge,
//&controller_gamebridge,
&controller_sdl,
&controller_keyboard,
//&controller_tas_recorder,

Loading…
Cancel
Save