This commit is contained in:
parent
961acd80d7
commit
2656c0dba9
@ -31,6 +31,7 @@
|
||||
(final: prev: {
|
||||
unstable = nixpkgs-unstable.legacyPackages.${prev.system};
|
||||
|
||||
"scx_lavd" = final.callPackage ./pkgs/scx/lavd.nix { };
|
||||
"scx_layered" = final.callPackage ./pkgs/scx/layered.nix { };
|
||||
"storj" = final.callPackage ./pkgs/storj.nix { };
|
||||
})
|
||||
|
@ -16,7 +16,7 @@ in
|
||||
|
||||
boot.kernelPackages = if pkgs.linuxPackages.kernelAtLeast "6.12" then pkgs.linuxPackages else (if pkgs.linuxPackages_latest.kernelAtLeast "6.12" then pkgs.linuxPackages_latest else pkgs.unstable.linuxPackages_testing);
|
||||
|
||||
environment.systemPackages = with pkgs; [ scx_layered ];
|
||||
environment.systemPackages = with pkgs; [ scx_lavd scx_layered ];
|
||||
};
|
||||
}
|
||||
|
||||
|
1646
pkgs/scx/lavd.Cargo.lock
generated
Normal file
1646
pkgs/scx/lavd.Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
53
pkgs/scx/lavd.nix
Normal file
53
pkgs/scx/lavd.nix
Normal file
@ -0,0 +1,53 @@
|
||||
{ stdenv, lib, fetchFromGitHub, rustPlatform, pkg-config, llvmPackages, elfutils, zlib, ... }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "scx_lavd";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sched-ext";
|
||||
repo = "scx";
|
||||
rev = "d8150c1913890c79b408073f95e094285b5b4927";
|
||||
hash = "sha256-Pd5h890jOyrOL0hIiRG91nlCST6cvhT8wpDTTGP3b74=";
|
||||
};
|
||||
version = "1.0.5-dirty";
|
||||
|
||||
cargoRoot = "scheds/rust/scx_lavd";
|
||||
cargoLock.lockFile = ./lavd.Cargo.lock;
|
||||
|
||||
postPatch = ''
|
||||
rm Cargo.toml Cargo.lock
|
||||
ln -fs ${./lavd.Cargo.lock} scheds/rust/scx_lavd/Cargo.lock
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ pkg-config llvmPackages.clang ];
|
||||
buildInputs = [ elfutils zlib ];
|
||||
|
||||
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
|
||||
|
||||
preBuild = ''
|
||||
cd scheds/rust/scx_lavd
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
cp target/${stdenv.targetPlatform.config}/release/scx_lavd $out/bin/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/sched-ext/scx";
|
||||
description = "scx_lavd sched_ext userspace scheduler";
|
||||
license = licenses.gpl2Only;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [{
|
||||
email = "jake@hillion.co.uk";
|
||||
matrix = "@jake:hillion.co.uk";
|
||||
name = "Jake Hillion";
|
||||
github = "JakeHillion";
|
||||
githubId = 5712856;
|
||||
}];
|
||||
};
|
||||
}
|
@ -12,11 +12,11 @@ rustPlatform.buildRustPackage rec {
|
||||
version = "1.0.5-dirty";
|
||||
|
||||
cargoRoot = "scheds/rust/scx_layered";
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
cargoLock.lockFile = ./layered.Cargo.lock;
|
||||
|
||||
postPatch = ''
|
||||
rm Cargo.toml Cargo.lock
|
||||
ln -fs ${./Cargo.lock} scheds/rust/scx_layered/Cargo.lock
|
||||
ln -fs ${./layered.Cargo.lock} scheds/rust/scx_layered/Cargo.lock
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ pkg-config llvmPackages.clang ];
|
||||
|
Loading…
Reference in New Issue
Block a user