From 0b61c6812b93f02cfa9f91dc282b86584e5ed199 Mon Sep 17 00:00:00 2001 From: Emin Arslan Date: Thu, 14 May 2026 15:28:01 +0300 Subject: [PATCH] Added the flake to fetch the official macos release --- flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 23 +++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..efc4226 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1778672786, + "narHash": "sha256-Blg88K1jwG+P0Mr27+rKMFCufdrWkV3wWh9AdYtz0FQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "eef00dfd8a712b34af845f9350bac681b1228bd1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..5205845 --- /dev/null +++ b/flake.nix @@ -0,0 +1,23 @@ +{ + description = "Pre-compiled Godot binary for MacOS, fetched from official releases and delivered as a flake"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + outputs = {self, nixpkgs}: + let + pkgs = nixpkgs.legacyPackages.aarch64-darwin; + in { + packages.aarch64-darwin.default = pkgs.stdenv.mkDerivation rec { + pname = "godot-mac"; + version = "v4.6.2-stable"; + src = pkgs.fetchurl { + url = "https://github.com/godotengine/godot/releases/download/4.6.2-stable/Godot_${version}_macos.universal.zip"; + sha256 = "sha256-ZmsqZOS1xZ2w5JdGBbiI63LrfU5g6HDSvmzBlye1CAc="; + }; + nativeBuildInputs = [pkgs.unzip]; + sourceRoot = "."; + installPhase = '' +mkdir -p $out/Applications +cp -r Godot.app $out/Applications/ +''; + }; + }; +}