Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
70 lines
1.5 KiB
Nix
70 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
fetchpatch,
|
|
rustPlatform,
|
|
clang,
|
|
pkg-config,
|
|
elfutils,
|
|
rustfmt,
|
|
zlib,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "below";
|
|
version = "0.9.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "facebookincubator";
|
|
repo = "below";
|
|
tag = "v${version}";
|
|
hash = "sha256-tPweJFqhZMOL+M08bDjW6HPmtuhr9IXJNP0c938O7Cg=";
|
|
};
|
|
|
|
cargoPatches = [
|
|
(fetchpatch {
|
|
name = "update-Cargo.lock.patch";
|
|
url = "https://github.com/facebookincubator/below/commit/f46f9936ac29fa23f5cb02cafe93ae724649bafc.patch";
|
|
hash = "sha256-J+M8FIuo8ToT3+9eZi5qfwfAW98XcNRqTIJd6O8z1Ig=";
|
|
})
|
|
];
|
|
|
|
cargoHash = "sha256-JrSSIwREHSg5YJivSdBIPjOkOtdw8qGCsa4yE7rJz/E=";
|
|
|
|
prePatch = ''
|
|
sed -i "s,ExecStart=.*/bin,ExecStart=$out/bin," etc/below.service
|
|
'';
|
|
postInstall = ''
|
|
install -d $out/lib/systemd/system
|
|
install -t $out/lib/systemd/system etc/below.service
|
|
'';
|
|
|
|
# bpf code compilation
|
|
hardeningDisable = [
|
|
"stackprotector"
|
|
"zerocallusedregs"
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
clang
|
|
pkg-config
|
|
rustfmt
|
|
];
|
|
buildInputs = [
|
|
elfutils
|
|
zlib
|
|
];
|
|
|
|
# needs /sys/fs/cgroup
|
|
doCheck = false;
|
|
|
|
meta = {
|
|
platforms = lib.platforms.linux;
|
|
maintainers = with lib.maintainers; [ globin ];
|
|
description = "Time traveling resource monitor for modern Linux systems";
|
|
license = lib.licenses.asl20;
|
|
homepage = "https://github.com/facebookincubator/below";
|
|
mainProgram = "below";
|
|
};
|
|
}
|