scx.cscheds: fix build

by doing this in postFixup, we hopefully don't create a cycle
here obviously this is a dirty fix, but better solutions can be
thought later
Closes https://github.com/NixOS/nixpkgs/issues/425498

Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com>
This commit is contained in:
John Titor 2025-07-16 14:19:19 +05:30 committed by Masum Reza
parent ff86cbb5c2
commit a15f79a5d2
2 changed files with 4 additions and 6 deletions

View File

@ -118,10 +118,9 @@ llvmPackages.stdenv.mkDerivation (finalAttrs: {
# We copy the compiled header files to the dev output # We copy the compiled header files to the dev output
# These are needed for the rust schedulers # These are needed for the rust schedulers
preInstall = '' postFixup = ''
mkdir -p ${placeholder "dev"}/libbpf ${placeholder "dev"}/bpftool mkdir -p ${placeholder "dev"}
cp -r libbpf/* ${placeholder "dev"}/libbpf/ cp -r libbpf ${placeholder "dev"}
cp -r bpftool/* ${placeholder "dev"}/bpftool/
''; '';
outputs = [ outputs = [

View File

@ -20,8 +20,7 @@ rustPlatform.buildRustPackage {
# Copy compiled headers and libs from scx.cscheds # Copy compiled headers and libs from scx.cscheds
postPatch = '' postPatch = ''
mkdir bpftool libbpf mkdir libbpf
cp -r ${scx.cscheds.dev}/bpftool/* bpftool/
cp -r ${scx.cscheds.dev}/libbpf/* libbpf/ cp -r ${scx.cscheds.dev}/libbpf/* libbpf/
''; '';