2023-04-29 10:32:09 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, pipewire
|
|
|
|
, pkg-config
|
|
|
|
, bcc
|
|
|
|
, dbus }:
|
|
|
|
|
|
|
|
let
|
|
|
|
version = "2.0.1";
|
|
|
|
in rustPlatform.buildRustPackage {
|
|
|
|
pname = "system76-scheduler";
|
|
|
|
inherit version;
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pop-os";
|
|
|
|
repo = "system76-scheduler";
|
|
|
|
rev = version;
|
|
|
|
hash = "sha256-o4noaLBXHDe7pMBHfQ85uzKJzwbBE5mkWq8h9l6iIZs=";
|
|
|
|
};
|
|
|
|
cargoSha256 = "sha256-hpFDAhOzm4v3lBWwAl/10pS5xvKCScdKsp5wpCeQ+FE=";
|
|
|
|
|
2023-05-26 23:26:12 +00:00
|
|
|
nativeBuildInputs = [ pkg-config rustPlatform.bindgenHook ];
|
2023-04-29 10:32:09 +00:00
|
|
|
buildInputs = [ dbus pipewire ];
|
|
|
|
|
|
|
|
EXECSNOOP_PATH = "${bcc}/bin/execsnoop";
|
|
|
|
|
|
|
|
# tests don't build
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/data
|
|
|
|
install -D -m 0644 data/com.system76.Scheduler.conf $out/etc/dbus-1/system.d/com.system76.Scheduler.conf
|
|
|
|
install -D -m 0644 data/*.kdl $out/data/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "System76 Scheduler";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "system76-scheduler";
|
2023-04-29 10:32:09 +00:00
|
|
|
homepage = "https://github.com/pop-os/system76-scheduler";
|
|
|
|
license = licenses.mpl20;
|
|
|
|
platforms = [ "x86_64-linux" "x86-linux" "aarch64-linux" ];
|
|
|
|
maintainers = [ maintainers.cmm ];
|
|
|
|
};
|
|
|
|
}
|