Skip to content

Commit

Permalink
Fix Flake (#5811)
Browse files Browse the repository at this point in the history
* Fix Flake

* final tweaks
  • Loading branch information
GameDungeon authored Jan 15, 2025
1 parent 3dda33d commit c8945d8
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 48 deletions.
31 changes: 7 additions & 24 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 32 additions & 24 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,42 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";

# PR for godot4-mono 4.2.1 https://github.com/NixOS/nixpkgs/pull/285941
# TODO: switch to master once merged
nixpkgs-godot.url = "github:GameDungeon/nixpkgs/Godot-4.2.2";
};

outputs = {
self,
nixpkgs,
nixpkgs-godot,
flake-utils,
}:
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = import nixpkgs {inherit system;};
pkgs-godot = import nixpkgs-godot {inherit system;};
fhs = pkgs.buildFHSUserEnv {
system:
let
pkgs = import nixpkgs {
inherit system;
config = {
# Dotnet 6 is EOL, but godot still needs it
# This can be removed in 4.4
permittedInsecurePackages = [
"dotnet-sdk-6.0.428"
];
};
};
fhs = pkgs.buildFHSEnv {
name = "fhs-shell";

targetPkgs = pkgs:
with pkgs; [
targetPkgs =
pkgs: with pkgs; [
# Godot
dotnet-sdk_8
((pkgs-godot.callPackage "${nixpkgs-godot}/pkgs/development/tools/godot/4/mono" {}).override {
withTouch = false;
withDebug = "yes"; # Set to yes if you wish to do profiling
(godot_4.override {
withMono = true;
dotnet-sdk_8 = dotnet-sdk_9;
})

# For compiling native libraries
cmake
clang_14
lld_17
clang_18
lld_18

# For packaging manually
zip
Expand All @@ -48,6 +52,9 @@
# Profiling
flamegraph

# Dotnet
dotnet-sdk_9

# Runtime dependencies
xorg.libX11
xorg.libXcursor
Expand All @@ -63,12 +70,13 @@
vulkan-headers
libglvnd
dbus
alsaLib
alsa-lib
pulseaudio
icu
];
};
in {
in
{
devShell = fhs.env;
}
);
Expand Down

0 comments on commit c8945d8

Please sign in to comment.