From a15f79a5d2abace70512fe3bdd2b7338baa85c1d Mon Sep 17 00:00:00 2001 From: John Titor <50095635+JohnRTitor@users.noreply.github.com> Date: Wed, 16 Jul 2025 14:19:19 +0530 Subject: [PATCH] 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> --- pkgs/os-specific/linux/scx/scx_cscheds.nix | 7 +++---- pkgs/os-specific/linux/scx/scx_rustscheds.nix | 3 +-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pkgs/os-specific/linux/scx/scx_cscheds.nix b/pkgs/os-specific/linux/scx/scx_cscheds.nix index d262c8b0d513..e024239ccb50 100644 --- a/pkgs/os-specific/linux/scx/scx_cscheds.nix +++ b/pkgs/os-specific/linux/scx/scx_cscheds.nix @@ -118,10 +118,9 @@ llvmPackages.stdenv.mkDerivation (finalAttrs: { # We copy the compiled header files to the dev output # These are needed for the rust schedulers - preInstall = '' - mkdir -p ${placeholder "dev"}/libbpf ${placeholder "dev"}/bpftool - cp -r libbpf/* ${placeholder "dev"}/libbpf/ - cp -r bpftool/* ${placeholder "dev"}/bpftool/ + postFixup = '' + mkdir -p ${placeholder "dev"} + cp -r libbpf ${placeholder "dev"} ''; outputs = [ diff --git a/pkgs/os-specific/linux/scx/scx_rustscheds.nix b/pkgs/os-specific/linux/scx/scx_rustscheds.nix index ed58e7bc7726..5678a8a788ba 100644 --- a/pkgs/os-specific/linux/scx/scx_rustscheds.nix +++ b/pkgs/os-specific/linux/scx/scx_rustscheds.nix @@ -20,8 +20,7 @@ rustPlatform.buildRustPackage { # Copy compiled headers and libs from scx.cscheds postPatch = '' - mkdir bpftool libbpf - cp -r ${scx.cscheds.dev}/bpftool/* bpftool/ + mkdir libbpf cp -r ${scx.cscheds.dev}/libbpf/* libbpf/ '';