diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2021-04-24 12:21:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-24 12:21:09 +0200 |
commit | 6c538c0a4d92337e9b4adaaca50f2d95ab1b22f9 (patch) | |
tree | 73d08abc173a385f27ab503a6d5e346adc4b8eaa /pkgs | |
parent | 5d41312d3319338ded07f3f63c2ea9691fc29f4d (diff) | |
parent | 61f2b36624b039c1ea35e3eba72d094e6bbb1e15 (diff) |
Merge pull request #120507 from rnhmjoj/ddcutil
ddcutil: 1.0.1 -> 1.1.0
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/tools/misc/ddcutil/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/misc/ddcutil/nixos-paths.diff | 54 |
2 files changed, 28 insertions, 30 deletions
diff --git a/pkgs/tools/misc/ddcutil/default.nix b/pkgs/tools/misc/ddcutil/default.nix index 1717b88f194a1..b1a42f57703f2 100644 --- a/pkgs/tools/misc/ddcutil/default.nix +++ b/pkgs/tools/misc/ddcutil/default.nix @@ -3,13 +3,13 @@ stdenv.mkDerivation rec { pname = "ddcutil"; - version = "1.0.1"; + version = "1.1.0"; src = fetchFromGitHub { owner = "rockowitz"; repo = "ddcutil"; rev = "v${version}"; - sha256 = "sha256-F/tKW81bAyYtwpxhl5XC8YyMB+6S0XmqqigwJY2WFDU="; + sha256 = "0wv8a8zjahzmi4qx0lc24mwyi3jklj1yxqq26fwklmfh5dv1y8yc"; }; patches = [ diff --git a/pkgs/tools/misc/ddcutil/nixos-paths.diff b/pkgs/tools/misc/ddcutil/nixos-paths.diff index e45eb88b51901..54d17ea5bfebd 100644 --- a/pkgs/tools/misc/ddcutil/nixos-paths.diff +++ b/pkgs/tools/misc/ddcutil/nixos-paths.diff @@ -1,32 +1,30 @@ -diff --git a/src/app_sysenv/query_sysenv_modules.c b/src/app_sysenv/query_sysenv_modules.c -index 59df64f1..fb244dd0 100644 ---- a/src/app_sysenv/query_sysenv_modules.c -+++ b/src/app_sysenv/query_sysenv_modules.c -@@ -50,7 +50,9 @@ bool is_module_loadable(char * module_name, int depth) { - g_snprintf(module_name_ko, 100, "%s.ko", module_name); - - char dirname[PATH_MAX]; -- g_snprintf(dirname, PATH_MAX, "/lib/modules/%s/kernel/drivers/i2c", utsbuf.release); -+ g_snprintf(dirname, PATH_MAX, -+ "/run/booted-system/kernel-modules/lib/modules/%s/kernel/drivers/i2c", -+ utsbuf.release); - - struct dirent *dent; - DIR *d; -diff --git a/src/util/linux_util.c b/src/util/linux_util.c -index 5eb8491c..3a129ccf 100644 --- a/src/util/linux_util.c +++ b/src/util/linux_util.c -@@ -29,8 +29,10 @@ bool is_module_builtin(char * module_name) - int rc = uname(&utsbuf); - assert(rc == 0); +@@ -125,6 +125,7 @@ + "lib64", + "lib32", + "usr/lib", // needed for arch? ++ "run/booted-system/kernel-modules/lib", // NixOS + NULL}; + int result = -1; + int ndx = 0; +@@ -204,14 +205,15 @@ + if (debug) + printf("(%s) machine: %s", __func__, utsbuf.machine); -- char modules_builtin_fn[100]; -- snprintf(modules_builtin_fn, 100, "/lib/modules/%s/modules.builtin", utsbuf.release); -+ char modules_builtin_fn[PATH_MAX]; -+ snprintf(modules_builtin_fn, PATH_MAX, -+ "/run/booted-system/kernel-modules/lib/modules/%s/modules.builtin", -+ utsbuf.release); +- char * libdirs[3]; ++ char * libdirs[4]; + libdirs[0] = "lib"; ++ libdirs[1] = "run/booted-system/kernel-modules/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; - char ko_name[40]; - snprintf(ko_name, 40, "%s.ko", module_name); + int libsndx = 0; + bool found = false; |