about summary refs log tree commit diff
path: root/pkgs/development/tools/gdtoolkit
diff options
context:
space:
mode:
authorrotaerk <m.scott.stewart@gmail.com>2022-09-11 20:05:50 -0400
committerrotaerk <m.scott.stewart@gmail.com>2023-07-30 18:46:07 -0400
commite138e656c7c3f7c25b62a73b9011f921563f4ee5 (patch)
tree8037f41b0925ad13509bc91158447945a8cc7ac7 /pkgs/development/tools/gdtoolkit
parent07be8b4c3989dd451c1a54dc8ae00dcee3b8785f (diff)
godot3: refactor and rename from godot
The godot base derivation was implemented by passing a recursive
attrset to mkDerivation. This is problematic because recursive
references to attributes that are later overridden don't notice the
override. Switched to the approach of giving mkDerivation a lambda
that receives a self argument, which allows recursive references to
the final value after overrides are applied.

The related derivations (for export templates, headless, and server
builds of godot) duplicated content from the base derivation. This
refactor eliminated that by using overridable attributes to
parameterize the scripts.

The main motivation for this refactor was to help me add derivations
for mono builds of godot.

Renamed to godot3 to distinguish from version 4, which is a complete
rewrite and effectively a different tool altogether.
Diffstat (limited to 'pkgs/development/tools/gdtoolkit')
-rw-r--r--pkgs/development/tools/gdtoolkit/default.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/development/tools/gdtoolkit/default.nix b/pkgs/development/tools/gdtoolkit/default.nix
index 67d98e0aa36b5..479b0b2c3636b 100644
--- a/pkgs/development/tools/gdtoolkit/default.nix
+++ b/pkgs/development/tools/gdtoolkit/default.nix
@@ -1,7 +1,7 @@
 { lib
 , python3Packages
 , fetchFromGitHub
-, godot-server
+, godot3-server
 }:
 
 let lark080 = python3Packages.lark.overrideAttrs (old: rec {
@@ -43,12 +43,12 @@ python3Packages.buildPythonApplication rec {
   nativeCheckInputs = with python3Packages; [
     pytestCheckHook
     hypothesis
-    godot-server
+    godot3-server
   ];
 
   preCheck =
     let
-      godotServerMajorVersion = lib.versions.major godot-server.version;
+      godotServerMajorVersion = lib.versions.major godot3-server.version;
       gdtoolkitMajorVersion = lib.versions.major version;
       msg = ''
         gdtoolkit major version ${gdtoolkitMajorVersion} does not match godot-server major version ${godotServerMajorVersion}!