Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed assets/sprites/equipment/diamond_armor.png
Binary file not shown.
Binary file removed assets/sprites/equipment/diamond_helmet.png
Binary file not shown.
Binary file removed assets/sprites/equipment/dragon_armor.png
Binary file not shown.
Binary file removed assets/sprites/equipment/dragon_crown.png
Binary file not shown.
Binary file removed assets/sprites/equipment/dragon_saddle.png
Binary file not shown.
Binary file removed assets/sprites/equipment/enchanted_saddle.png
Binary file not shown.
Binary file removed assets/sprites/equipment/gold_armor.png
Binary file not shown.
Binary file removed assets/sprites/equipment/gold_helmet.png
Binary file not shown.
Binary file removed assets/sprites/equipment/iron_armor.png
Binary file not shown.
Binary file removed assets/sprites/equipment/iron_helmet.png
Binary file not shown.
Binary file removed assets/sprites/equipment/leather_saddle.png
Binary file not shown.
Binary file removed assets/sprites/equipment/padded_saddle.png
Binary file not shown.
Binary file removed assets/sprites/equipment/royal_saddle.png
Binary file not shown.
Binary file removed assets/sprites/equipment/steel_armor.png
Binary file not shown.
Binary file removed assets/sprites/equipment/steel_helmet.png
Binary file not shown.
155 changes: 0 additions & 155 deletions demo_save_protection.py

This file was deleted.

File renamed without changes.
File renamed without changes.
172 changes: 114 additions & 58 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,66 +7,122 @@

outputs = { self, nixpkgs, ... }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
# Support multiple systems
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];

# Helper function to generate an attribute set for all systems
forAllSystems = nixpkgs.lib.genAttrs systems;

# Helper to get nixpkgs for a system
nixpkgsFor = forAllSystems (system: import nixpkgs {
inherit system;
});
in {
devShells.${system}.default = pkgs.mkShell {
packages = [
pkgs.uv
pkgs.python312 # uv respects this and uses it
];
devShells = forAllSystems (system:
let
pkgs = nixpkgsFor.${system};
isDarwin = pkgs.stdenv.isDarwin;
isLinux = pkgs.stdenv.isLinux;

# Base packages available on all systems
basePackages = [
pkgs.uv
pkgs.python312
];

# System libraries for pygame - platform specific
linuxBuildInputs = with pkgs; [
stdenv.cc.cc.lib
zlib
glib
SDL2
SDL2_image
SDL2_mixer
SDL2_ttf
libpng
libjpeg
portmidi
freetype
alsa-lib
# X11 and graphics libraries
xorg.libX11
xorg.libXext
xorg.libXcursor
xorg.libXrandr
xorg.libXi
xorg.libXinerama
xorg.libXxf86vm
libGL
libGLU
];

darwinBuildInputs = with pkgs; [
zlib
SDL2
SDL2_image
SDL2_mixer
SDL2_ttf
libpng
libjpeg
portmidi
freetype
] ++ (with pkgs.darwin.apple_sdk.frameworks; [
Cocoa
CoreAudio
CoreVideo
IOKit
ForceFeedback
Carbon
AppKit
OpenGL
]);

buildInputs = if isDarwin then darwinBuildInputs else linuxBuildInputs;

# System libraries required by pygame
buildInputs = with pkgs; [
stdenv.cc.cc.lib
zlib
glib
SDL2
SDL2_image
SDL2_mixer
SDL2_ttf
libpng
libjpeg
portmidi
freetype
alsa-lib
# X11 and graphics libraries
xorg.libX11
xorg.libXext
xorg.libXcursor
xorg.libXrandr
xorg.libXi
xorg.libXinerama
xorg.libXxf86vm
libGL
libGLU
];
# Library path for Linux
linuxLibraryPath = pkgs.lib.makeLibraryPath [
pkgs.stdenv.cc.cc.lib
pkgs.zlib
pkgs.glib
pkgs.SDL2
pkgs.SDL2_image
pkgs.SDL2_mixer
pkgs.SDL2_ttf
pkgs.libpng
pkgs.libjpeg
pkgs.portmidi
pkgs.freetype
pkgs.alsa-lib
pkgs.xorg.libX11
pkgs.xorg.libXext
pkgs.xorg.libXcursor
pkgs.xorg.libXrandr
pkgs.xorg.libXi
pkgs.xorg.libXinerama
pkgs.xorg.libXxf86vm
pkgs.libGL
pkgs.libGLU
];
in {
default = pkgs.mkShell {
packages = basePackages;
buildInputs = buildInputs;

# Set up library path for dynamic linking
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
pkgs.stdenv.cc.cc.lib
pkgs.zlib
pkgs.glib
pkgs.SDL2
pkgs.SDL2_image
pkgs.SDL2_mixer
pkgs.SDL2_ttf
pkgs.libpng
pkgs.libjpeg
pkgs.portmidi
pkgs.freetype
pkgs.alsa-lib
# X11 and graphics libraries
pkgs.xorg.libX11
pkgs.xorg.libXext
pkgs.xorg.libXcursor
pkgs.xorg.libXrandr
pkgs.xorg.libXi
pkgs.xorg.libXinerama
pkgs.xorg.libXxf86vm
pkgs.libGL
pkgs.libGLU
];
};
# Set up library path for dynamic linking (Linux only)
shellHook = if isLinux then ''
export LD_LIBRARY_PATH="${linuxLibraryPath}:$LD_LIBRARY_PATH"
'' else ''
# macOS uses DYLD_LIBRARY_PATH, but it's generally not needed
# as the Nix store paths are already handled correctly
export DYLD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath buildInputs}:$DYLD_LIBRARY_PATH"
'';
};
}
);
};
}
Loading