1{
2 lib,
3 callPackage,
4 fetchFromGitHub,
5}:
6let
7 scx-common = rec {
8 versionInfo = lib.importJSON ./version.json;
9
10 inherit (versionInfo.scx) version;
11
12 src = fetchFromGitHub {
13 owner = "sched-ext";
14 repo = "scx";
15 rev = "refs/tags/v${versionInfo.scx.version}";
16 inherit (versionInfo.scx) hash;
17 };
18
19 meta = {
20 homepage = "https://github.com/sched-ext/scx";
21 changelog = "https://github.com/sched-ext/scx/releases/tag/v${versionInfo.scx.version}";
22 license = lib.licenses.gpl2Only;
23 platforms = lib.platforms.linux;
24 badPlatforms = [ "aarch64-linux" ];
25 maintainers = with lib.maintainers; [ johnrtitor ];
26 };
27 };
28
29 schedulers = lib.mergeAttrsList [
30 { cscheds = import ./scx_cscheds.nix; }
31 { rustscheds = import ./scx_rustscheds.nix; }
32 { full = import ./scx_full.nix; }
33 ];
34in
35(lib.mapAttrs (name: scheduler: callPackage scheduler { inherit scx-common; }) schedulers)
36// {
37 inherit scx-common;
38}