tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
ddcutil: 1.1.0 -> 1.2.0
Peter Hoeg
4 years ago
d18c23b3
cae929fa
+33
-47
2 changed files
expand all
collapse all
unified
split
pkgs
tools
misc
ddcutil
default.nix
nixos-paths.diff
+33
-17
pkgs/tools/misc/ddcutil/default.nix
···
1
-
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config
2
-
, glib, i2c-tools, udev, libgudev, libusb1, libdrm, xorg }:
0
0
0
0
0
0
0
0
0
0
0
0
3
4
stdenv.mkDerivation rec {
5
pname = "ddcutil";
6
-
version = "1.1.0";
7
8
src = fetchFromGitHub {
9
-
owner = "rockowitz";
10
-
repo = "ddcutil";
11
-
rev = "v${version}";
12
-
sha256 = "0wv8a8zjahzmi4qx0lc24mwyi3jklj1yxqq26fwklmfh5dv1y8yc";
13
};
14
15
-
patches = [
16
-
# Look for kernel modules in /run/booted-system/kernel-modules/lib/modules/*
17
-
./nixos-paths.diff
18
-
];
19
20
-
nativeBuildInputs = [ autoreconfHook pkg-config ];
21
buildInputs = [
22
-
i2c-tools udev libgudev
23
-
glib libusb1 libdrm xorg.libXrandr
0
0
0
0
0
0
24
];
0
0
25
26
meta = with lib; {
27
-
homepage = "http://www.ddcutil.com/";
28
description = "Query and change Linux monitor settings using DDC/CI and USB";
29
-
license = licenses.gpl2;
30
-
platforms = platforms.linux;
31
maintainers = with maintainers; [ rnhmjoj ];
32
};
33
}
···
1
+
{ lib
2
+
, stdenv
3
+
, fetchFromGitHub
4
+
, autoreconfHook
5
+
, pkg-config
6
+
, glib
7
+
, i2c-tools
8
+
, udev
9
+
, kmod
10
+
, libgudev
11
+
, libusb1
12
+
, libdrm
13
+
, xorg
14
+
}:
15
16
stdenv.mkDerivation rec {
17
pname = "ddcutil";
18
+
version = "1.2.0";
19
20
src = fetchFromGitHub {
21
+
owner = "rockowitz";
22
+
repo = "ddcutil";
23
+
rev = "v${version}";
24
+
sha256 = "sha256-MH7WnJgROgLvttQEbd/21mLRFElObp4KINy8RarqkRo=";
25
};
26
27
+
nativeBuildInputs = [ autoreconfHook pkg-config ];
0
0
0
28
0
29
buildInputs = [
30
+
glib
31
+
i2c-tools
32
+
kmod
33
+
libdrm
34
+
libgudev
35
+
libusb1
36
+
udev
37
+
xorg.libXrandr
38
];
39
+
40
+
enableParallelBuilding = true;
41
42
meta = with lib; {
43
+
homepage = "http://www.ddcutil.com/";
44
description = "Query and change Linux monitor settings using DDC/CI and USB";
45
+
license = licenses.gpl2;
46
+
platforms = platforms.linux;
47
maintainers = with maintainers; [ rnhmjoj ];
48
};
49
}
-30
pkgs/tools/misc/ddcutil/nixos-paths.diff
···
1
-
--- a/src/util/linux_util.c
2
-
+++ b/src/util/linux_util.c
3
-
@@ -125,6 +125,7 @@
4
-
"lib64",
5
-
"lib32",
6
-
"usr/lib", // needed for arch?
7
-
+ "run/booted-system/kernel-modules/lib", // NixOS
8
-
NULL};
9
-
int result = -1;
10
-
int ndx = 0;
11
-
@@ -204,14 +205,15 @@
12
-
if (debug)
13
-
printf("(%s) machine: %s", __func__, utsbuf.machine);
14
-
15
-
- char * libdirs[3];
16
-
+ char * libdirs[4];
17
-
libdirs[0] = "lib";
18
-
+ libdirs[1] = "run/booted-system/kernel-modules/lib";
19
-
if (streq(utsbuf.machine, "amd_64")){
20
-
- libdirs[1] = "lib64";
21
-
- libdirs[2] = NULL;
22
-
+ libdirs[2] = "lib64";
23
-
+ libdirs[3] = NULL;
24
-
}
25
-
else
26
-
- libdirs[1] = NULL;
27
-
+ libdirs[2] = NULL;
28
-
29
-
int libsndx = 0;
30
-
bool found = false;
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0