2021-06-12 10:35:19 +01:00
|
|
|
{ pkg-config, libusb1, dbus, lib, rustPlatform, fetchFromGitHub }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "system76-power";
|
2021-12-06 17:21:02 +00:00
|
|
|
version = "1.1.20";
|
2021-06-12 10:35:19 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pop-os";
|
|
|
|
repo = "system76-power";
|
|
|
|
rev = version;
|
2021-12-06 17:21:02 +00:00
|
|
|
sha256 = "sha256-Qk9zHqwFlUTWE+YRt2GASIekbDoBCHPAUUN3+0wpvfw=";
|
2021-06-12 10:35:19 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ dbus libusb1 ];
|
|
|
|
|
2021-12-06 17:21:02 +00:00
|
|
|
cargoSha256 = "sha256-iG7M9ICFRTFVkbC89DyfR+Iyi7jaT9WmG3PSdBOF7YI=";
|
2021-06-12 10:35:19 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -D -m 0644 data/system76-power.conf $out/etc/dbus-1/system.d/system76-power.conf
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "System76 Power Management";
|
|
|
|
homepage = "https://github.com/pop-os/system76-power";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
|
|
|
maintainers = [ maintainers.jwoudenberg ];
|
|
|
|
};
|
|
|
|
}
|