From 4d8ca88fd8a0a2287ee5c023877f14d53d4854c1 Mon Sep 17 00:00:00 2001 From: Ana Gelez Date: Wed, 21 Feb 2024 15:46:27 +0100 Subject: [PATCH] Use powercap from nixpkgs --- nur.nix | 4 +--- pkgs/colmet/default.nix | 7 +++---- pkgs/libpowercap/default.nix | 26 -------------------------- 3 files changed, 4 insertions(+), 33 deletions(-) delete mode 100644 pkgs/libpowercap/default.nix diff --git a/nur.nix b/nur.nix index e1ca27f..1409f26 100644 --- a/nur.nix +++ b/nur.nix @@ -26,8 +26,6 @@ rec { ''; }); - libpowercap = pkgs.callPackage ./pkgs/libpowercap { }; - haskellPackages = import ./pkgs/haskellPackages { inherit pkgs; }; batsched-140 = pkgs.callPackage ./pkgs/batsched/batsched140.nix { inherit loguru redox debug; intervalset = intervalsetlight; }; @@ -54,7 +52,7 @@ rec { bacnet-stack = pkgs.callPackage ./pkgs/bacnet-stack { }; - colmet = pkgs.callPackage ./pkgs/colmet { inherit libpowercap; }; + colmet = pkgs.callPackage ./pkgs/colmet { }; colmet-rs = pkgs.callPackage ./pkgs/colmet-rs { }; diff --git a/pkgs/colmet/default.nix b/pkgs/colmet/default.nix index cb1e768..9a4e587 100644 --- a/pkgs/colmet/default.nix +++ b/pkgs/colmet/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, fetchFromGitHub, python3Packages, libpowercap }: +{ lib, pkgs, fetchFromGitHub, python3Packages, powercap }: python3Packages.buildPythonApplication rec { name = "colmet-${version}"; @@ -11,7 +11,7 @@ python3Packages.buildPythonApplication rec { sha256 = "1g2m6crdmlgk8c57qa1nss20128dnw9x58yg4r5wdc7zliicahqq"; }; - buildInputs = [ libpowercap ]; + buildInputs = [ powercap ]; propagatedBuildInputs = with python3Packages; [ pyinotify @@ -34,10 +34,9 @@ python3Packages.buildPythonApplication rec { meta = with lib; { description = "Collecting metrics about process running in cpuset and in a distributed environnement"; homepage = https://github.com/oar-team/colmet; - platforms = libpowercap.meta.platforms; + platforms = powercap.meta.platforms; licence = licenses.gpl2; longDescription = '' ''; - broken = true; # due to libpowercap }; } diff --git a/pkgs/libpowercap/default.nix b/pkgs/libpowercap/default.nix deleted file mode 100644 index bbfe145..0000000 --- a/pkgs/libpowercap/default.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ stdenv, lib, fetchFromGitHub, cmake }: - -stdenv.mkDerivation rec { - name = "powercap-${version}"; - version = "0.2.0"; - - - src = fetchFromGitHub { - owner = "powercap"; - repo = "powercap"; - rev = "ad05da76ca84d3c5277d932a32d15fd7c709aa7d"; - sha256 = "1xpik0wrg0gk4s03wfjr5sc6p410dpddg9iyrsdgg2lia55d0ajd"; - }; - - buildInputs = [ cmake ]; - - meta = with lib; { - homepage = "https://github.com/powercap/powercap"; - description = "C bindings to the Linux Power Capping Framework in sysfs "; - longDescription = "This project provides the powercap library -- a generic C interface to the Linux power capping framework (sysfs interface). It includes an implementation for - working with Intel Running Average Power Limit (RAPL)."; - license = licenses.bsd3; - platforms = platforms.linux; - broken = true; - }; -}