34 lines
1.1 KiB
Nix
34 lines
1.1 KiB
Nix
{ pkgs, lib, rustPlatform, fetchFromGitHub, ... }:
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "system76-scheduler";
|
|
version = "1.2.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pop-os";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "sha256-uFFJkuMxqcGj6OQShF0zh/FGwX4/ln1l6NwGonkUsNI=";
|
|
};
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
bcc
|
|
];
|
|
|
|
EXECSNOOP_PATH = "${pkgs.bcc}/bin/execsnoop";
|
|
|
|
cargoSha256 = "sha256-s91T/Ttr7G8sjyf0Mp5suep4IA+l/r4118B+ue33yfQ=";
|
|
|
|
postInstall = ''
|
|
mkdir -p $out/etc/system76-scheduler/assignments \
|
|
$out/etc/system76-scheduler/exceptions \
|
|
$out/lib/systemd/system \
|
|
$out/etc/dbus-1/system.d
|
|
install -Dm0644 data/config.ron $out/etc/system76-scheduler/config.ron
|
|
install -Dm0644 data/assignments.ron $out/etc/system76-scheduler/assignments/default.ron
|
|
install -Dm0644 data/exceptions.ron $out/etc/system76-scheduler/exceptions/default.ron
|
|
# install -Dm0644 data/com.system76.Scheduler.service $out/lib/systemd/system/com.system76.Scheduler.service
|
|
install -Dm0644 data/com.system76.Scheduler.conf $out/etc/dbus-1/system.d/com.system76.Scheduler.conf
|
|
'';
|
|
|
|
}
|