chore: add package build to flake
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
game/.godot
|
game/.godot
|
||||||
|
result
|
||||||
|
39
flake.nix
39
flake.nix
@@ -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
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -9,7 +9,7 @@ custom_features=""
|
|||||||
export_filter="all_resources"
|
export_filter="all_resources"
|
||||||
include_filter=""
|
include_filter=""
|
||||||
exclude_filter=""
|
exclude_filter=""
|
||||||
export_path="../dist/fmm.x86_64"
|
export_path=""
|
||||||
patches=PackedStringArray()
|
patches=PackedStringArray()
|
||||||
encryption_include_filters=""
|
encryption_include_filters=""
|
||||||
encryption_exclude_filters=""
|
encryption_exclude_filters=""
|
||||||
|
Reference in New Issue
Block a user