Merge pull request #175719 from trofi/netdata-smaller-closure
netdata: do not persist ./configure flags to decrease closure size
This commit is contained in:
commit
09638d2783
2 changed files with 20 additions and 0 deletions
|
@ -49,6 +49,10 @@ in stdenv.mkDerivation rec {
|
|||
# Therefore we put it into `/run/netdata`, which is owned
|
||||
# by netdata only.
|
||||
./ipc-socket-in-run.patch
|
||||
|
||||
# Avoid build-only inputs in closure leaked by configure command:
|
||||
# https://github.com/NixOS/nixpkgs/issues/175693#issuecomment-1143344162
|
||||
./skip-CONFIGURE_COMMAND.patch
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = optionalString withDebug "-O1 -ggdb -DNETDATA_INTERNAL_CHECKS=1";
|
||||
|
|
16
pkgs/tools/system/netdata/skip-CONFIGURE_COMMAND.patch
Normal file
16
pkgs/tools/system/netdata/skip-CONFIGURE_COMMAND.patch
Normal file
|
@ -0,0 +1,16 @@
|
|||
Shrink closure size by avoiding paths embedded from configure call.
|
||||
|
||||
https://github.com/NixOS/nixpkgs/issues/175693
|
||||
--- a/daemon/buildinfo.c
|
||||
+++ b/daemon/buildinfo.c
|
||||
@@ -248,7 +248,9 @@ void print_build_info(void) {
|
||||
char *prebuilt_distro = NULL;
|
||||
get_install_type(&install_type, &prebuilt_arch, &prebuilt_distro);
|
||||
|
||||
- printf("Configure options: %s\n", CONFIGURE_COMMAND);
|
||||
+ // To minimize closure size do not persist configure options
|
||||
+ // with build-time inputs.
|
||||
+ printf("Configure options: REMOVED\n");
|
||||
|
||||
if (install_type == NULL) {
|
||||
printf("Install type: unknown\n");
|
Loading…
Reference in a new issue