freedroidrpg: remove build-time flags embedding into binary

Noticed extra -dev dependencies in the runtime closure.

Before the change:

$ nix path-info -rsSh $(nix-build -A freedroidrpg) | nl | tail -n1 | unnix
158 /<<NIX>>/freedroidrpg-0.16.1 228.2M 808.1M

After the change:

$ nix path-info -rsSh $(nix-build -A freedroidrpg) | nl | tail -n1 | unnix
141 /<<NIX>>/freedroidrpg-0.16.1 228.2M 450.7M

+18
+3
pkgs/games/freedroidrpg/default.nix
··· 18 18 url = "https://gitlab.com/freedroid/freedroid-src/-/commit/e610d427374226b79da5258d979936459f30c761.patch"; 19 19 sha256 = "1s7sw4dkc7b6i72j6x47driq6v0k3wss48l9ivd4fw40n3iaxjb1"; 20 20 }) 21 + 22 + # Do not embed build flags in the binary to reduce closure size. 23 + ./drop-build-deps.patch 21 24 ]; 22 25 23 26 nativeBuildInputs = [ pkg-config gettext python3 ];
+15
pkgs/games/freedroidrpg/drop-build-deps.patch
··· 1 + Do not embed paths to build-only depends (-I...SDL2-dev and friends) 2 + into savefile lua comments. 3 + --- a/src/savestruct_internal.c 4 + +++ b/src/savestruct_internal.c 5 + @@ -486,8 +486,8 @@ void save_game_data(struct auto_string *strout) 6 + autostr_append(strout, 7 + "SAVEGAME: %s %s %s;sizeof(tux_t)=%d;sizeof(enemy)=%d;sizeof(bullet)=%d;MAXBULLETS=%d\n", 8 + SAVEGAME_VERSION, SAVEGAME_REVISION, VERSION, (int)sizeof(tux_t), (int)sizeof(enemy), (int)sizeof(bullet), (int)MAXBULLETS); 9 + - autostr_append(strout, "BUILD_CFLAGS: %s\n", BUILD_CFLAGS); 10 + - autostr_append(strout, "BUILD_LDFLAGS: %s\n", BUILD_LDFLAGS); 11 + + autostr_append(strout, "BUILD_CFLAGS: %s\n", "<hidden>"); 12 + + autostr_append(strout, "BUILD_LDFLAGS: %s\n", "<hidden>"); 13 + autostr_append(strout, "VERSION: %s\n", freedroid_version); 14 + autostr_append(strout, "--]]\n"); 15 +