From https://github.com/NixOS/nixpkgs/blob/nixos-21.05/pkgs/tools/misc/ddcutil/nixos-paths.diff --- a/src/util/linux_util.c +++ b/src/util/linux_util.c @@ -125,6 +125,7 @@ "lib64", "lib32", "usr/lib", // needed for arch? + "run/booted-system/kernel/lib", // Guix System NULL}; int result = -1; int ndx = 0; @@ -204,14 +205,15 @@ if (debug) printf("(%s) machine: %s", __func__, utsbuf.machine); - char * libdirs[3]; + char * libdirs[4]; libdirs[0] = "lib"; + libdirs[1] = "run/booted-system/kernel/lib"; if (streq(utsbuf.machine, "amd_64")){ - libdirs[1] = "lib64"; - libdirs[2] = NULL; + libdirs[2] = "lib64"; + libdirs[3] = NULL; } else - libdirs[1] = NULL; + libdirs[2] = NULL; int libsndx = 0; bool found = false;