2024-06-20 14:57:18 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
gnat,
|
|
|
|
gprbuild,
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "powerjoular";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "1.0.0";
|
2024-06-20 14:57:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "joular";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2024-07-01 15:47:52 +00:00
|
|
|
hash = "sha256-3YKoxZTh9ScudAtsE4CJUbcallm7/vvxIdXwaOZt2hA=";
|
2024-06-20 14:57:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
gnat
|
|
|
|
gprbuild
|
|
|
|
];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
gprbuild
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp obj/powerjoular $out/bin
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "CLI software to monitor the power consumption of software and hardware components";
|
|
|
|
homepage = "https://github.com/joular/powerjoular";
|
|
|
|
maintainers = [ maintainers.julienmalka ];
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|