mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-21 12:59:04 +02:00
powertop: 2.14 -> 2.15
This commit is contained in:
parent
7816224051
commit
700dda2156
|
@ -1,42 +1,41 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, fetchpatch, gettext, libnl, ncurses, pciutils
|
{ lib, stdenv, fetchFromGitHub, gettext, libnl, ncurses, pciutils
|
||||||
, pkg-config, zlib, autoreconfHook }:
|
, pkg-config, zlib, autoreconfHook, autoconf-archive, nix-update-script, testers, powertop }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "powertop";
|
pname = "powertop";
|
||||||
version = "2.14";
|
version = "2.15";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "fenrus75";
|
owner = "fenrus75";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1zkr2y5nb1nr22nq8a3zli87iyfasfq6489p7h1k428pv8k45w4f";
|
hash = "sha256-53jfqt0dtMqMj3W3m6ravUTzApLQcljDHfdXejeZa4M=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
|
||||||
# Pull upstream patch for ncurses-6.3 compatibility
|
|
||||||
(fetchpatch {
|
|
||||||
name = "ncurses-6.3.patch";
|
|
||||||
url = "https://github.com/fenrus75/powertop/commit/9ef1559a1582f23d599c149601c3a8e06809296c.patch";
|
|
||||||
sha256 = "0qx69f3bwhxgsga9nas8lgrclf1rxvr7fq7fd2n8dv3x4lsb46j1";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
outputs = [ "out" "man" ];
|
outputs = [ "out" "man" ];
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config autoreconfHook ];
|
nativeBuildInputs = [ pkg-config autoreconfHook autoconf-archive ];
|
||||||
buildInputs = [ gettext libnl ncurses pciutils zlib ];
|
buildInputs = [ gettext libnl ncurses pciutils zlib ];
|
||||||
|
|
||||||
NIX_LDFLAGS = [ "-lpthread" ];
|
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace src/main.cpp --replace "/sbin/modprobe" "modprobe"
|
substituteInPlace src/main.cpp --replace "/sbin/modprobe" "modprobe"
|
||||||
substituteInPlace src/calibrate/calibrate.cpp --replace "/usr/bin/xset" "xset"
|
substituteInPlace src/calibrate/calibrate.cpp --replace "/usr/bin/xset" "xset"
|
||||||
substituteInPlace src/tuning/bluetooth.cpp --replace "/usr/bin/hcitool" "hcitool"
|
substituteInPlace src/tuning/bluetooth.cpp --replace "/usr/bin/hcitool" "hcitool"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
updateScript = nix-update-script { };
|
||||||
|
tests.version = testers.testVersion {
|
||||||
|
package = powertop;
|
||||||
|
command = "powertop --version";
|
||||||
|
inherit version;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
inherit (src.meta) homepage;
|
||||||
|
changelog = "https://github.com/fenrus75/powertop/releases/tag/v${version}";
|
||||||
description = "Analyze power consumption on Intel-based laptops";
|
description = "Analyze power consumption on Intel-based laptops";
|
||||||
homepage = "https://01.org/powertop";
|
|
||||||
license = licenses.gpl2Only;
|
license = licenses.gpl2Only;
|
||||||
maintainers = with maintainers; [ fpletz anthonyroussel ];
|
maintainers = with maintainers; [ fpletz anthonyroussel ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
|
|
Loading…
Reference in a new issue