summaryrefslogtreecommitdiff
path: root/nix/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/flake.nix')
-rw-r--r--nix/flake.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/nix/flake.nix b/nix/flake.nix
new file mode 100644
index 0000000..f4e1616
--- /dev/null
+++ b/nix/flake.nix
@@ -0,0 +1,21 @@
+{
+ outputs = { self, nixpkgs }: let
+ pkgs = nixpkgs.legacyPackages."x86_64-linux";
+ in {
+ devShells."x86_64-linux".default = pkgs.mkShell {
+ buildInputs = [ pkgs.SDL2 ];
+ nativeBuildInputs = [
+ pkgs.gcc-arm-embedded
+ pkgs.gdb
+ pkgs.pkg-config
+ (pkgs.python39.withPackages (py: [ py.numpy py.pillow ]))
+ ];
+
+ shellHook = ''
+ export MAKEFLAGS="AR=gcc-ar"
+ export CXXFLAGS="-O3 -flto $(pkg-config --cflags sdl2)"
+ export LDFLAGS="-O3 -flto $(pkg-config --libs sdl2)"
+ '';
+ };
+ };
+}