I haven't maintained this package in many years, nor do I use it
currently, so I'm not best placed to maintain it. @shiryel wrote the
package for Godot 4, which works quite differently.
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.
scons build system does not work by default in nixpkgs envoironment as
it filters system environment and throws away NIX_* flags:
https://scons.org/doc/2.1.0/HTML/scons-user/x1750.html
Fix build system to always propagate os.environment.
*Flags implies a list
slightly relevant:
> stdenv: start deprecating non-list configureFlags https://github.com/NixOS/nixpkgs/pull/173172
the makeInstalledTests function in `nixos/tests/installed-tests/default.nix` isn't available outside of nixpkgs so
it's not a breaking change
Stripping reduces the template size from around 500MB to 40MB for Linux.
This is added explicitly here because mkDerivation does not automatically
strip binaries in the template directory.
This also impacts the size of the exported games and programs.
For example, here are the size of the `oh-my-git` package using this
template, without and with stripping:
```
❯ du -sh result*/
375M result-oh-my-git-without-strip/
45M result-oh-my-git-with-strip/
```
GitHub: closes https://github.com/NixOS/nixpkgs/issues/170470
continuation of #109595
pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.
python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.