diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-08-08 16:04:42 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-08-13 06:35:37 +0000 |
commit | 12aaa58dac35800b5b7d77f81cf2a87c21ee55da (patch) | |
tree | be0add9e5c22a85d20b5d78206aa74f956eb2a1b /nixpkgs/pkgs/development/tools/godot | |
parent | 45892a5591202f75a1c2f1ca7c62a92c7566e3c5 (diff) | |
parent | 5a8e9243812ba528000995b294292d3b5e120947 (diff) | |
download | nixlib-12aaa58dac35800b5b7d77f81cf2a87c21ee55da.tar nixlib-12aaa58dac35800b5b7d77f81cf2a87c21ee55da.tar.gz nixlib-12aaa58dac35800b5b7d77f81cf2a87c21ee55da.tar.bz2 nixlib-12aaa58dac35800b5b7d77f81cf2a87c21ee55da.tar.lz nixlib-12aaa58dac35800b5b7d77f81cf2a87c21ee55da.tar.xz nixlib-12aaa58dac35800b5b7d77f81cf2a87c21ee55da.tar.zst nixlib-12aaa58dac35800b5b7d77f81cf2a87c21ee55da.zip |
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Conflicts: nixpkgs/pkgs/applications/window-managers/sway/default.nix nixpkgs/pkgs/build-support/go/module.nix nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix nixpkgs/pkgs/development/libraries/mesa/default.nix nixpkgs/pkgs/servers/dict/dictd-db.nix Link: https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/issues/391
Diffstat (limited to 'nixpkgs/pkgs/development/tools/godot')
-rw-r--r-- | nixpkgs/pkgs/development/tools/godot/4/default.nix | 66 |
1 files changed, 43 insertions, 23 deletions
diff --git a/nixpkgs/pkgs/development/tools/godot/4/default.nix b/nixpkgs/pkgs/development/tools/godot/4/default.nix index 8e77a7e9e298..a39c8e9f5014 100644 --- a/nixpkgs/pkgs/development/tools/godot/4/default.nix +++ b/nixpkgs/pkgs/development/tools/godot/4/default.nix @@ -36,30 +36,21 @@ assert lib.asserts.assertOneOf "withPrecision" withPrecision [ "single" "double" ]; let - options = { - # Options from 'godot/SConstruct' - platform = withPlatform; - target = withTarget; - precision = withPrecision; # Floating-point precision level - - # Options from 'godot/platform/linuxbsd/detect.py' - pulseaudio = withPulseaudio; # Use PulseAudio - dbus = withDbus; # Use D-Bus to handle screensaver and portal desktop settings - speechd = withSpeechd; # Use Speech Dispatcher for Text-to-Speech support - fontconfig = withFontconfig; # Use fontconfig for system fonts support - udev = withUdev; # Use udev for gamepad connection callbacks - touch = withTouch; # Enable touch events - }; + mkSconsFlagsFromAttrSet = lib.mapAttrsToList (k: v: + if builtins.isString v + then "${k}=${v}" + else "${k}=${builtins.toJSON v}"); in stdenv.mkDerivation rec { pname = "godot"; - version = "4.0.3-stable"; + version = "4.1-stable"; + commitHash = "970459615f6b2b4151742ec6d7ef8559f87fd5c5"; src = fetchFromGitHub { owner = "godotengine"; repo = "godot"; - rev = version; - hash = "sha256-g9+CV3HsiJqiSJpZvK0N7BqKzp2Pvi6otjRLsFdmWGk="; + rev = commitHash; + hash = "sha256-v9qKrPYQz4c+xkSu/2ru7ZE5EzKVyXhmrxyHZQkng2U="; }; nativeBuildInputs = [ @@ -96,15 +87,44 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - # Options from 'godot/SConstruct' and 'godot/platform/linuxbsd/detect.py' - sconsFlags = [ "production=true" ]; + # Set the build name which is part of the version. In official downloads, this + # is set to 'official'. When not specified explicitly, it is set to + # 'custom_build'. Other platforms packaging Godot (Gentoo, Arch, Flatpack + # etc.) usually set this to their name as well. + # + # See also 'methods.py' in the Godot repo and 'build' in + # https://docs.godotengine.org/en/stable/classes/class_engine.html#class-engine-method-get-version-info + BUILD_NAME = "nixpkgs"; + + # Required for the commit hash to be included in the version number. + # + # `methods.py` reads the commit hash from `.git/HEAD` and manually follows + # refs. Since we just write the hash directly, there is no need to emulate any + # other parts of the .git directory. + # + # See also 'hash' in + # https://docs.godotengine.org/en/stable/classes/class_engine.html#class-engine-method-get-version-info preConfigure = '' - sconsFlags+=" ${ - lib.concatStringsSep " " - (lib.mapAttrsToList (k: v: "${k}=${builtins.toJSON v}") options) - }" + mkdir -p .git + echo ${commitHash} > .git/HEAD ''; + sconsFlags = mkSconsFlagsFromAttrSet { + # Options from 'SConstruct' + production = true; # Set defaults to build Godot for use in production + platform = withPlatform; + target = withTarget; + precision = withPrecision; # Floating-point precision level + + # Options from 'platform/linuxbsd/detect.py' + pulseaudio = withPulseaudio; # Use PulseAudio + dbus = withDbus; # Use D-Bus to handle screensaver and portal desktop settings + speechd = withSpeechd; # Use Speech Dispatcher for Text-to-Speech support + fontconfig = withFontconfig; # Use fontconfig for system fonts support + udev = withUdev; # Use udev for gamepad connection callbacks + touch = withTouch; # Enable touch events + }; + outputs = [ "out" "man" ]; installPhase = '' |