Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, fetchFromGitHub 3, rustPlatform 4, pipewire 5, pkg-config 6, bcc 7, dbus }: 8 9let 10 version = "2.0.1"; 11in rustPlatform.buildRustPackage { 12 pname = "system76-scheduler"; 13 inherit version; 14 src = fetchFromGitHub { 15 owner = "pop-os"; 16 repo = "system76-scheduler"; 17 rev = version; 18 hash = "sha256-o4noaLBXHDe7pMBHfQ85uzKJzwbBE5mkWq8h9l6iIZs="; 19 }; 20 cargoSha256 = "sha256-hpFDAhOzm4v3lBWwAl/10pS5xvKCScdKsp5wpCeQ+FE="; 21 22 nativeBuildInputs = [ pkg-config rustPlatform.bindgenHook ]; 23 buildInputs = [ dbus pipewire ]; 24 25 EXECSNOOP_PATH = "${bcc}/bin/execsnoop"; 26 27 # tests don't build 28 doCheck = false; 29 30 postInstall = '' 31 mkdir -p $out/data 32 install -D -m 0644 data/com.system76.Scheduler.conf $out/etc/dbus-1/system.d/com.system76.Scheduler.conf 33 install -D -m 0644 data/*.kdl $out/data/ 34 ''; 35 36 meta = with lib; { 37 description = "System76 Scheduler"; 38 homepage = "https://github.com/pop-os/system76-scheduler"; 39 license = licenses.mpl20; 40 platforms = [ "x86_64-linux" "x86-linux" "aarch64-linux" ]; 41 maintainers = [ maintainers.cmm ]; 42 }; 43}