Compare commits

..

2 Commits

Author SHA1 Message Date
3c90e6a26c chore: add package build to flake 2025-08-14 22:15:29 +02:00
b7bc90f8b5 game: add linux export preset 2025-08-14 20:43:59 +02:00
3 changed files with 81 additions and 0 deletions

1
.gitignore vendored
View File

@@ -1 +1,2 @@
game/.godot
result

View File

@@ -33,5 +33,44 @@
};
}
);
packages = forAllSystems (
{ pkgs }:
{
fmm = pkgs.stdenv.mkDerivation {
pname = "fmm";
version = "0.1.0";
src = ./.;
strictDeps = true;
nativeBuildInputs = with pkgs; [
godot
];
buildPhase = ''
runHook preBuild
export HOME=$(mktemp -d)
mkdir -p $HOME/.local/share/godot/
ln -s ${pkgs.godot.export-template}/share/godot/export_templates "$HOME/.local/share/godot/"
mkdir -p game/build
cd game
echo "godot --headless --export-debug Linux ./build/fmm"
godot --headless --export-release Linux ./build/fmm
runHook postBuild
'';
installPhase = ''
find .
install -D -m 755 -t $out/libexec ./build/fmm
install -D -m 644 -t $out/libexec ./build/fmm.pck
install -d -m 755 $out/bin
ln -s $out/libexec/fmm $out/bin/fmm
'';
};
}
);
};
}

41
game/export_presets.cfg Normal file
View File

@@ -0,0 +1,41 @@
[preset.0]
name="Linux"
platform="Linux"
runnable=true
advanced_options=false
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path=""
patches=PackedStringArray()
encryption_include_filters=""
encryption_exclude_filters=""
seed=0
encrypt_pck=false
encrypt_directory=false
script_export_mode=2
[preset.0.options]
custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=1
binary_format/embed_pck=false
texture_format/s3tc_bptc=true
texture_format/etc2_astc=false
binary_format/architecture="x86_64"
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="#!/usr/bin/env bash
export DISPLAY=:0
unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"
\"{temp_dir}/{exe_name}\" {cmd_args}"
ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\")
rm -rf \"{temp_dir}\""