about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/godot
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-04-28 14:39:00 +0000
committerAlyssa Ross <hi@alyssa.is>2021-06-10 08:52:36 +0000
commit693e64ef7421374338ddb1dc12b9573feec75972 (patch)
tree2526ac075d248699c35d63e04499890ee4381f5f /nixpkgs/pkgs/development/tools/godot
parent7014df2256694d97093d6f2bb1db340d346dea88 (diff)
parent8e4fe32876ca15e3d5eb3ecd3ca0b224417f5f17 (diff)
downloadnixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar
nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar.gz
nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar.bz2
nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar.lz
nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar.xz
nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar.zst
nixlib-693e64ef7421374338ddb1dc12b9573feec75972.zip
Merge commit '8e4fe32876ca15e3d5eb3ecd3ca0b224417f5f17'
Diffstat (limited to 'nixpkgs/pkgs/development/tools/godot')
-rw-r--r--nixpkgs/pkgs/development/tools/godot/default.nix6
-rw-r--r--nixpkgs/pkgs/development/tools/godot/export-templates.nix17
2 files changed, 20 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/development/tools/godot/default.nix b/nixpkgs/pkgs/development/tools/godot/default.nix
index 217717d3e7d7..d5eb7a9b0e01 100644
--- a/nixpkgs/pkgs/development/tools/godot/default.nix
+++ b/nixpkgs/pkgs/development/tools/godot/default.nix
@@ -58,11 +58,11 @@ in stdenv.mkDerivation rec {
       --replace "Exec=godot" "Exec=$out/bin/godot"
   '';
 
-  meta = {
+  meta = with lib; {
     homepage    = "https://godotengine.org";
     description = "Free and Open Source 2D and 3D game engine";
-    license     = lib.licenses.mit;
+    license     = licenses.mit;
     platforms   = [ "i686-linux" "x86_64-linux" ];
-    maintainers = [ lib.maintainers.twey ];
+    maintainers = with maintainers; [ twey ];
   };
 }
diff --git a/nixpkgs/pkgs/development/tools/godot/export-templates.nix b/nixpkgs/pkgs/development/tools/godot/export-templates.nix
new file mode 100644
index 000000000000..bfcf3e3b3dca
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/godot/export-templates.nix
@@ -0,0 +1,17 @@
+{ godot, lib }:
+
+# https://docs.godotengine.org/en/stable/development/compiling/compiling_for_x11.html#building-export-templates
+godot.overrideAttrs (oldAttrs: rec {
+  pname = "godot-export-templates";
+  sconsFlags = "target=release platform=x11 tools=no";
+  installPhase = ''
+    # The godot export command expects the export templates at
+    # .../share/godot/templates/3.2.3.stable with 3.2.3 being the godot version.
+    mkdir -p "$out/share/godot/templates/${oldAttrs.version}.stable"
+    cp bin/godot.x11.opt.64 $out/share/godot/templates/${oldAttrs.version}.stable/linux_x11_64_release
+  '';
+  outputs = [ "out" ];
+  meta.description =
+    "Free and Open Source 2D and 3D game engine (export templates)";
+  meta.maintainers = with lib.maintainers; [ twey jojosch ];
+})