mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
ddcutil: 1.1.0 -> 1.2.0
This commit is contained in:
parent
cae929fadd
commit
d18c23b355
2 changed files with 34 additions and 48 deletions
|
@ -1,33 +1,49 @@
|
|||
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config
|
||||
, glib, i2c-tools, udev, libgudev, libusb1, libdrm, xorg }:
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, autoreconfHook
|
||||
, pkg-config
|
||||
, glib
|
||||
, i2c-tools
|
||||
, udev
|
||||
, kmod
|
||||
, libgudev
|
||||
, libusb1
|
||||
, libdrm
|
||||
, xorg
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ddcutil";
|
||||
version = "1.1.0";
|
||||
version = "1.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rockowitz";
|
||||
repo = "ddcutil";
|
||||
rev = "v${version}";
|
||||
sha256 = "0wv8a8zjahzmi4qx0lc24mwyi3jklj1yxqq26fwklmfh5dv1y8yc";
|
||||
owner = "rockowitz";
|
||||
repo = "ddcutil";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-MH7WnJgROgLvttQEbd/21mLRFElObp4KINy8RarqkRo=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Look for kernel modules in /run/booted-system/kernel-modules/lib/modules/*
|
||||
./nixos-paths.diff
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||
|
||||
buildInputs = [
|
||||
glib
|
||||
i2c-tools
|
||||
kmod
|
||||
libdrm
|
||||
libgudev
|
||||
libusb1
|
||||
udev
|
||||
xorg.libXrandr
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||
buildInputs = [
|
||||
i2c-tools udev libgudev
|
||||
glib libusb1 libdrm xorg.libXrandr
|
||||
];
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://www.ddcutil.com/";
|
||||
homepage = "http://www.ddcutil.com/";
|
||||
description = "Query and change Linux monitor settings using DDC/CI and USB";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ rnhmjoj ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
--- 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-modules/lib", // NixOS
|
||||
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-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;
|
||||
|
||||
int libsndx = 0;
|
||||
bool found = false;
|
Loading…
Reference in a new issue