Skip to content

Commit

Permalink
powertop: 2.13 -> 2.14
Browse files Browse the repository at this point in the history
  • Loading branch information
fpletz committed Jul 28, 2021
1 parent 7db354e commit 8a91213
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions pkgs/os-specific/linux/powertop/default.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
{ lib, stdenv, fetchurl, fetchpatch, gettext, libnl, ncurses, pciutils, pkg-config, zlib }:
{ lib, stdenv, fetchFromGitHub, fetchpatch, gettext, libnl, ncurses, pciutils
, pkg-config, zlib, autoreconfHook }:

stdenv.mkDerivation rec {
pname = "powertop";
version = "2.13";
version = "2.14";

src = fetchurl {
url = "https://01.org/sites/default/files/downloads/${pname}-${version}.tar.gz";
sha256 = "0y1ixw8v17fdb1ima0zshrd0rh4zxdh10r93nrrvq6d4lhn9jpx6";
src = fetchFromGitHub {
owner = "fenrus75";
repo = pname;
rev = "v${version}";
sha256 = "1zkr2y5nb1nr22nq8a3zli87iyfasfq6489p7h1k428pv8k45w4f";
};

outputs = [ "out" "man" ];

nativeBuildInputs = [ pkg-config ];
nativeBuildInputs = [ pkg-config autoreconfHook ];
buildInputs = [ gettext libnl ncurses pciutils zlib ];

patches = lib.optional stdenv.hostPlatform.isMusl (
Expand All @@ -22,6 +25,8 @@ stdenv.mkDerivation rec {
}
);

NIX_LDFLAGS = [ "-lpthread" ];

postPatch = ''
substituteInPlace src/main.cpp --replace "/sbin/modprobe" "modprobe"
substituteInPlace src/calibrate/calibrate.cpp --replace "/usr/bin/xset" "xset"
Expand Down

0 comments on commit 8a91213

Please sign in to comment.