cpufrequtils: perform minimal Makefile substitution & use makeFlags

Also, use multiple outputs
This commit is contained in:
Doron Behar
2026-01-21 18:25:28 +02:00
parent ba4d87485c
commit d74677b6dc
+21 -4
View File
@@ -15,18 +15,35 @@ stdenv.mkDerivation rec {
hash = "sha256-AFOgcYPQaUg70GJhS8YcuAgMV32mHN9+ExsGThoa8Yg=";
};
patchPhase = ''
sed -e "s@= /usr/bin/@= @g" \
-e "s@/usr/@$out/@" \
-i Makefile
postPatch = ''
substituteInPlace Makefile \
--replace-fail /usr/bin/install install
'';
makeFlags = [
"bindir=$(out)/bin"
"sbindir=$(out)/sbin"
"mandir=$(man)/man"
"includedir=$(dev)/include"
"libdir=$(lib)/lib"
"localedir=$(out)/share/locale"
"docdir=$(man)/share/doc/packages/cpufrequtils"
"confdir=$(out)/etc/"
];
buildInputs = [
stdenv.cc.libc.linuxHeaders
libtool
gettext
];
outputs = [
"out"
"lib"
"dev"
"man"
];
meta = {
description = "Tools to display or change the CPU governor settings";
homepage = "http://ftp.be.debian.org/pub/linux/utils/kernel/cpufreq/cpufrequtils.html";