mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-11 18:32:23 +08:00
@@ -58,10 +58,6 @@ llvmPackages.stdenv.mkDerivation (finalAttrs: {
|
|||||||
cp ${finalAttrs.fetchLibbpf} meson-scripts/fetch_libbpf
|
cp ${finalAttrs.fetchLibbpf} meson-scripts/fetch_libbpf
|
||||||
substituteInPlace meson.build \
|
substituteInPlace meson.build \
|
||||||
--replace-fail '[build_bpftool' "['${lib.getExe bash}', build_bpftool"
|
--replace-fail '[build_bpftool' "['${lib.getExe bash}', build_bpftool"
|
||||||
|
|
||||||
# TODO: Remove in next release.
|
|
||||||
substituteInPlace lib/scxtest/overrides.h \
|
|
||||||
--replace-fail '#define __builtin_preserve_enum_value(x,y,z) 1' '#define __builtin_preserve_enum_value(x,y) 1'
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
@@ -89,7 +85,6 @@ llvmPackages.stdenv.mkDerivation (finalAttrs: {
|
|||||||
"systemd" = false;
|
"systemd" = false;
|
||||||
# not for nix
|
# not for nix
|
||||||
"openrc" = false;
|
"openrc" = false;
|
||||||
"libalpm" = false;
|
|
||||||
})
|
})
|
||||||
(lib.mapAttrsToList lib.mesonBool {
|
(lib.mapAttrsToList lib.mesonBool {
|
||||||
# needed libs are already fetched as FOD
|
# needed libs are already fetched as FOD
|
||||||
@@ -106,16 +101,8 @@ llvmPackages.stdenv.mkDerivation (finalAttrs: {
|
|||||||
"zerocallusedregs"
|
"zerocallusedregs"
|
||||||
];
|
];
|
||||||
|
|
||||||
# We copy the compiled header files to the dev output
|
|
||||||
# These are needed for the rust schedulers
|
|
||||||
postFixup = ''
|
|
||||||
mkdir -p ${placeholder "dev"}
|
|
||||||
cp -r libbpf ${placeholder "dev"}
|
|
||||||
'';
|
|
||||||
|
|
||||||
outputs = [
|
outputs = [
|
||||||
"bin"
|
"bin"
|
||||||
"dev"
|
|
||||||
"out"
|
"out"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
zlib,
|
zlib,
|
||||||
zstd,
|
zstd,
|
||||||
scx-common,
|
scx-common,
|
||||||
scx,
|
|
||||||
protobuf,
|
protobuf,
|
||||||
libseccomp,
|
libseccomp,
|
||||||
}:
|
}:
|
||||||
@@ -17,12 +16,6 @@ rustPlatform.buildRustPackage {
|
|||||||
|
|
||||||
inherit (scx-common.versionInfo.scx) cargoHash;
|
inherit (scx-common.versionInfo.scx) cargoHash;
|
||||||
|
|
||||||
# Copy compiled headers and libs from scx.cscheds
|
|
||||||
postPatch = ''
|
|
||||||
mkdir libbpf
|
|
||||||
cp -r ${scx.cscheds.dev}/libbpf/* libbpf/
|
|
||||||
'';
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
pkg-config
|
pkg-config
|
||||||
rustPlatform.bindgenHook
|
rustPlatform.bindgenHook
|
||||||
@@ -37,18 +30,6 @@ rustPlatform.buildRustPackage {
|
|||||||
|
|
||||||
env = {
|
env = {
|
||||||
BPF_CLANG = lib.getExe llvmPackages.clang;
|
BPF_CLANG = lib.getExe llvmPackages.clang;
|
||||||
BPF_EXTRA_CFLAGS_PRE_INCL = lib.concatStringsSep " " [
|
|
||||||
"-I${scx.cscheds.dev}/libbpf/src/usr/include"
|
|
||||||
"-I${scx.cscheds.dev}/libbpf/include/uapi"
|
|
||||||
"-I${scx.cscheds.dev}/libbpf/include/linux"
|
|
||||||
];
|
|
||||||
RUSTFLAGS = lib.concatStringsSep " " [
|
|
||||||
"-C relocation-model=pic"
|
|
||||||
"-C link-args=-lelf"
|
|
||||||
"-C link-args=-lz"
|
|
||||||
"-C link-args=-lzstd"
|
|
||||||
"-L ${scx.cscheds.dev}/libbpf/src"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
hardeningDisable = [
|
hardeningDisable = [
|
||||||
@@ -63,6 +44,7 @@ rustPlatform.buildRustPackage {
|
|||||||
"--skip=compat::tests::test_struct_has_field"
|
"--skip=compat::tests::test_struct_has_field"
|
||||||
"--skip=cpumask"
|
"--skip=cpumask"
|
||||||
"--skip=topology"
|
"--skip=topology"
|
||||||
|
"--skip=proc_data::tests::test_thread_operations"
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = scx-common.meta // {
|
meta = scx-common.meta // {
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
{
|
{
|
||||||
"scx": {
|
"scx": {
|
||||||
"version": "1.0.14",
|
"version": "1.0.15",
|
||||||
"hash": "sha256-Wh+8vaQO93Erj+z8S2C633UDmUrFjQc3Bg+Nm7EML0E=",
|
"hash": "sha256-HZIcJVWb0prkCjoSw7hd4JKve+unWFnfz9bGXZaF6EA=",
|
||||||
"cargoHash": "sha256-6uiDx2/5ZcYkz8x8vuOTEUclIttzxVMvh1Q6QHg9N6E="
|
"cargoHash": "sha256-CRk8vLwSylNM5M9j0iwRbAmzAREUOJAl28BdY2o1zGs="
|
||||||
},
|
},
|
||||||
"bpftool": {
|
"bpftool": {
|
||||||
"rev": "183e7010387d1fc9f08051426e9a9fbd5f8d409e",
|
"rev": "183e7010387d1fc9f08051426e9a9fbd5f8d409e",
|
||||||
"hash": "sha256-ZZly6csVWOmtLmld1fhSDUqyRgZx2gSMGXTaSASGv7c="
|
"hash": "sha256-ZZly6csVWOmtLmld1fhSDUqyRgZx2gSMGXTaSASGv7c="
|
||||||
},
|
},
|
||||||
"libbpf": {
|
"libbpf": {
|
||||||
"rev": "c5f22aca0f3aa855daa159b2777472b35e721804",
|
"rev": "b4fa3e39a77fd65574fb5f899486795fc3d89bd9",
|
||||||
"hash": "sha256-ggGVqAkdZt28KAx+LztVIYGxj0j79hKcPKmUy8TrJy8="
|
"hash": "sha256-wlymVgcLlGCUOC92CkYU6QZZnqx8nidSfhr1pTiS8aM="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user