diff --git a/flake.lock b/flake.lock index 8a5062e..cd99436 100644 --- a/flake.lock +++ b/flake.lock @@ -1,64 +1,12 @@ { "nodes": { - "flake-parts": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1701473968, - "narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1702759837, - "narHash": "sha256-u3XeJVRe/Q975nwFE+6ALEwypMKJEELMJKDAhSKyq3M=", + "lastModified": 1739834344, + "narHash": "sha256-PUAcU3YlKNFYrBBHkqshO4wRfMunzhMTEIH1dyhjTtk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "b2566f4f897ac6224e094b167d9488d03e157f28", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-23.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lib": { - "locked": { - "dir": "lib", - "lastModified": 1701253981, - "narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58", - "type": "github" - }, - "original": { - "dir": "lib", - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable": { - "locked": { - "lastModified": 1702539185, - "narHash": "sha256-KnIRG5NMdLIpEkZTnN5zovNYc0hhXjAgv6pfd5Z4c7U=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "aa9d4729cbc99dabacb50e3994dcefb3ea0f7447", + "rev": "f0295845e58ada369322524631821b01c0db13a7", "type": "github" }, "original": { @@ -70,9 +18,7 @@ }, "root": { "inputs": { - "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs", - "nixpkgs-unstable": "nixpkgs-unstable" + "nixpkgs": "nixpkgs" } } }, diff --git a/flake.nix b/flake.nix index fd5d7fb..e64ae0b 100644 --- a/flake.nix +++ b/flake.nix @@ -2,53 +2,37 @@ description = "FabApp"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; - nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable"; - flake-parts.url = "github:hercules-ci/flake-parts"; + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + }; - outputs = inputs@{ flake-parts, nixpkgs, ... }: - flake-parts.lib.mkFlake { inherit inputs; } { - flake = { }; + outputs = + inputs@{ nixpkgs, ... }: + let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in + { + formatter.${system} = pkgs.nixfmt-rfc-style; - systems = [ "x86_64-linux" ]; + devShell.${system} = + with pkgs; + mkShell { + LD_LIBRARY_PATH = lib.makeLibraryPath [ stdenv.cc.cc ]; # For libstdc++.so.6 + # ANDROID_HOME = "${androidenv.androidPkgs_9_0.androidsdk}/libexec/android-sdk"; - # https://flake.parts/module-arguments.html#persystem-module-parameters - perSystem = { pkgs, system, ... }: { + nativeBuildInputs = [ + clang + just - _module.args.pkgs = import inputs.nixpkgs-unstable { - inherit system; - # https://flake.parts/overlays - # NOTE: zig overlay triggers issues with X11/GL libraries - # This might be misconfiguration on my end - overlays = [ ]; - config = { - allowUnfree = true; - android_sdk.accept_license = true; - }; + godot_4 + + android-tools + # androidenv.androidPkgs_9_0.androidsdk + # androidenv.androidPkgs_9_0.platform-tools + jre_headless + ]; + buildInputs = [ sqlite ]; }; - - formatter = pkgs.nixfmt; - - devShells.default = with pkgs; - mkShell { - LD_LIBRARY_PATH = - lib.makeLibraryPath [ stdenv.cc.cc ]; # For libstdc++.so.6 - ANDROID_HOME = "${androidenv.androidPkgs_9_0.androidsdk}/libexec/android-sdk"; - - nativeBuildInputs = [ - clang - just - - godot_4 - - android-tools - androidenv.androidPkgs_9_0.androidsdk - androidenv.androidPkgs_9_0.platform-tools - jre_headless - ]; - buildInputs = [ sqlite ]; - }; - }; }; } diff --git a/godot/main.gd b/godot/main.gd index 7fc10e9..0b81f04 100644 --- a/godot/main.gd +++ b/godot/main.gd @@ -19,4 +19,3 @@ func _ready(): func _update_state(old: Global.State, new: Global.State): print("updated state") - diff --git a/godot/project.godot b/godot/project.godot index a747d48..81b55b9 100644 --- a/godot/project.godot +++ b/godot/project.godot @@ -12,7 +12,7 @@ config_version=5 config/name="Logue" run/main_scene="res://main.tscn" -config/features=PackedStringArray("4.2", "GL Compatibility") +config/features=PackedStringArray("4.3", "GL Compatibility") config/icon="res://icon.svg" [autoload] diff --git a/justfile b/justfile index cb4ae20..9b3ba94 100644 --- a/justfile +++ b/justfile @@ -1,10 +1,7 @@ -alias b := build -alias r := run -alias t := test -alias fmt := format +# alias fmt := format edit: - godot4 --editor --quiet godot/project.godot + nixVulkanIntel godot4 --editor --quiet godot/project.godot android-keystore: mkdir -p android @@ -14,14 +11,5 @@ android-keystore: pre-build: git submodule update --init --recursive -build: - zig build -Doptimize=Debug - -run: - nixGL zig build run -- {{ justfile_directory() }}/life.sqlite3 - -test: - zig build test - format: fd -e nix -X nix fmt {}