Add flake.nix
This commit is contained in:
+1
-1
@@ -5,6 +5,6 @@ bin/*
|
||||
|
||||
.clangd
|
||||
|
||||
include/binding/ruby_compiled.h
|
||||
include/bindings/ruby_compiled.h
|
||||
|
||||
p.vim
|
||||
|
||||
@@ -23,9 +23,9 @@ SDL_LIBS_RELEASE := $(shell pkg-config --libs sdl3 sdl3-ttf sdl3-image)
|
||||
|
||||
CFLAGS_DEBUG := \
|
||||
-std=c++20 -Wall -Wextra \
|
||||
-O0 -g -fno-omit-frame-pointer \
|
||||
-Og -g -fno-omit-frame-pointer \
|
||||
-Wno-unused-command-line-argument \
|
||||
-I./include -I./libs/mruby/include \
|
||||
-I./include -I./libs/mruby/build/host/include \
|
||||
$(SDL_CFLAGS)
|
||||
|
||||
CFLAGS_RELEASE := \
|
||||
@@ -33,7 +33,7 @@ CFLAGS_RELEASE := \
|
||||
-flto=thin \
|
||||
-fno-rtti -fomit-frame-pointer -DNDEBUG -s \
|
||||
-Wno-unused-command-line-argument \
|
||||
-I./include -I./libs/mruby/include \
|
||||
-I./include -I./libs/mruby/build/host/include \
|
||||
$(SDL_CFLAGS)
|
||||
|
||||
PCH_CFLAGS_DEBUG := $(CFLAGS_DEBUG) -x c++-header
|
||||
@@ -123,4 +123,4 @@ $(OBJ_DIR)/release/%.o: $(SRC_DIR)/%.cc $(PCH_RELEASE)
|
||||
clean:
|
||||
@rm -rf $(OBJ_DIR) $(BIN_DIR)
|
||||
@$(MGEM_DIR)/compile.sh clean
|
||||
@echo "Cleaned build artifacts."
|
||||
@echo "Cleaned build artifacts."
|
||||
|
||||
Generated
+27
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1783224372,
|
||||
"narHash": "sha256-8i/87eeoqiGE4yOTjwSA3Eh/ziJRQEmd/unYU+K27sk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d407951447dcd00442e97087bf374aad70c04cea",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
description = "game";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
systems = [ "x86_64-linux" ];
|
||||
|
||||
forAllSystems = f:
|
||||
nixpkgs.lib.genAttrs systems (system:
|
||||
f (import nixpkgs {
|
||||
inherit system;
|
||||
}));
|
||||
in {
|
||||
devShells = forAllSystems (pkgs: {
|
||||
default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
clang
|
||||
ccache
|
||||
pkg-config
|
||||
gnumake
|
||||
ruby
|
||||
xxd
|
||||
|
||||
sdl3
|
||||
sdl3-ttf
|
||||
sdl3-image
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
export LD=clang
|
||||
'';
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
+1
-1
Submodule libs/mruby updated: 479af5c1bd...88b93f66c4
Reference in New Issue
Block a user