Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 30 lines 1.4 kB view raw
1{ godot3 }: 2 3godot3.overrideAttrs ( 4 self: base: { 5 pname = "godot3-export-templates"; 6 godotBuildDescription = "nix export templates"; 7 8 # As described in default.nix, adding the link flags to pulseaudio in detect.py was necessary to 9 # allow the dlopen calls to succeed in Nix builds of godot. However, it seems that this *breaks* 10 # the export templates, resulting in programs exported from godot using these export templates to 11 # be unable to load this library. 12 shouldAddLinkFlagsToPulse = false; 13 14 shouldBuildTools = false; 15 godotBuildTarget = "release"; 16 godotBinInstallPath = "share/godot/templates/${self.version}.stable"; 17 installedGodotBinName = "linux_${self.godotBuildPlatform}_64_${self.godotBuildTarget}"; 18 19 # https://docs.godotengine.org/en/stable/development/compiling/optimizing_for_size.html 20 # Stripping reduces the template size from around 500MB to 40MB for Linux. 21 # This also impacts the size of the exported games. 22 # This is added explicitly here because mkDerivation does not automatically 23 # strip binaries in the template directory. 24 stripAllList = (base.stripAllList or [ ]) ++ [ "share/godot/templates" ]; 25 26 meta = base.meta // { 27 homepage = "https://docs.godotengine.org/en/stable/development/compiling/compiling_for_x11.html#building-export-templates"; 28 }; 29 } 30)