Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1Disable imake autodetection for: 2- LinuxDistribution to avoid injection of /usr paths 3- gcc to avoid use uf /usr/bin/gcc 4 5https://github.com/NixOS/nixpkgs/issues/135337 6--- a/imake.c 7+++ b/imake.c 8@@ -1065,6 +1065,7 @@ get_distrib(FILE *inFile) 9 fprintf (inFile, "%s\n", "#define LinuxWare 11"); 10 fprintf (inFile, "%s\n", "#define LinuxYggdrasil 12"); 11 12+#if 0 /* disable system autodetection. Fall through to LinuxUnknown. */ 13 # ifdef CROSSCOMPILE 14 if (CrossCompiling) { 15 fprintf (inFile, "%s\n", 16@@ -1090,6 +1091,7 @@ get_distrib(FILE *inFile) 17 * at the content of /etc/debian_version */ 18 return; 19 } 20+#endif 21 /* what's the definitive way to tell what any particular distribution is? */ 22 23 fprintf (inFile, "%s\n", "#define DefaultLinuxDistribution LinuxUnknown"); 24@@ -1337,6 +1339,7 @@ get_gcc_version(FILE *inFile, char *name) 25 static boolean 26 get_gcc(char *cmd) 27 { 28+#if 0 /* disable gcc autodetection. Fall through to explicitly set. */ 29 struct stat sb; 30 static const char* gcc_path[] = { 31 #if defined(linux) || \ 32@@ -1385,6 +1388,9 @@ get_gcc(char *cmd) 33 } 34 } 35 return FALSE; 36+#endif 37+ strcpy (cmd, IMAKE_COMPILETIME_CPP); 38+ return TRUE; 39 } 40 41 #ifdef CROSSCOMPILE