chore: initial commit

This commit is contained in:
2025-08-19 02:07:11 +02:00
commit 29ab64fee0
6 changed files with 117 additions and 0 deletions

3
.gdignore Normal file
View File

@@ -0,0 +1,3 @@
README.md
flake.nix
flake.lock

3
.gitattributes vendored Normal file
View File

@@ -0,0 +1,3 @@
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf
*.png filter=lfs diff=lfs merge=lfs -text

3
.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
# Godot 4+ specific ignores
.godot/
/android/

1
README.md Normal file
View File

@@ -0,0 +1 @@
# Slopvivors

27
flake.lock generated Normal file
View File

@@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1755186698,
"narHash": "sha256-wNO3+Ks2jZJ4nTHMuks+cxAiVBGNuEBXsT29Bz6HASo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fbcf476f790d8a217c3eab4e12033dc4a0f6d23c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

80
flake.nix Normal file
View File

@@ -0,0 +1,80 @@
{
description = "Survivor Slop game";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs =
{ self, nixpkgs }:
let
allSystems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems =
f:
nixpkgs.lib.genAttrs allSystems (
system:
f {
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
}
);
in
{
devShells = forAllSystems (
{ pkgs }:
{
default = pkgs.mkShell {
packages = with pkgs; [
godot
krita
gimp
pixelorama
aseprite
];
};
}
);
packages = forAllSystems (
{ pkgs }:
{
slopvivors = pkgs.stdenv.mkDerivation {
pname = "slopvivors";
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 build
godot --headless --export-release Linux ./build/slopvivors
runHook postBuild
'';
installPhase = ''
find .
install -D -m 755 -t $out/libexec ./build/slopvivors
install -D -m 644 -t $out/libexec ./build/slopvivors.pck
install -d -m 755 $out/bin
ln -s $out/libexec/utdg $out/bin/slopvivors
'';
};
}
);
};
}