Created
December 3, 2024 01:24
-
-
Save Widdershin/93629d3a5c1e6bda65e3d0c219954b45 to your computer and use it in GitHub Desktop.
Nix flake for Godot with C# support on MacOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if has nix; then | |
if ! has nix_direnv_version || ! nix_direnv_version 3.0.6; then | |
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.6/direnvrc" "sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM=" | |
fi | |
use flake . | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"nodes": { | |
"nixpkgs": { | |
"locked": { | |
"lastModified": 1733129712, | |
"narHash": "sha256-JTLTaLyfbLLRmHNLvjJD1Om2TBWQX9X/49bQobhQQok=", | |
"owner": "nixos", | |
"repo": "nixpkgs", | |
"rev": "d93b83e0743720585203621e373bbb6cbcf3549b", | |
"type": "github" | |
}, | |
"original": { | |
"owner": "nixos", | |
"ref": "release-24.11", | |
"repo": "nixpkgs", | |
"type": "github" | |
} | |
}, | |
"root": { | |
"inputs": { | |
"nixpkgs": "nixpkgs" | |
} | |
} | |
}, | |
"root": "root", | |
"version": 7 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
description = "Godot Mono on MacOS"; | |
inputs = { | |
nixpkgs.url = "github:nixos/nixpkgs?ref=release-24.11"; | |
}; | |
outputs = { self, nixpkgs }: | |
let | |
pkgs = nixpkgs.legacyPackages.aarch64-darwin; | |
godotApp = pkgs.fetchzip { | |
name = "Godot.app"; | |
url = "https://github.com/godotengine/godot/releases/download/4.3-stable/Godot_v4.3-stable_mono_macos.universal.zip"; | |
hash = "sha256-AD+BYuA9F9KedMCrbynRg85atEWGFguz4gy15BTvpzo="; | |
}; | |
godot = pkgs.writeScriptBin "godot" '' | |
open ${godotApp} | |
''; | |
in { | |
devShells.aarch64-darwin.default = pkgs.mkShell { | |
name = "godot-dev-shell"; | |
packages = with pkgs; [ | |
dotnetCorePackages.sdk_9_0 | |
# run via 'godot' command in nix shell | |
godot | |
]; | |
}; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment