Files
nixpkgs/pkgs/by-name/li/liburing/package.nix
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

65 lines
1.6 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation rec {
pname = "liburing";
version = "2.12";
src = fetchFromGitHub {
owner = "axboe";
repo = "liburing";
tag = "liburing-${version}";
hash = "sha256-sEMzkyjrCc49ogfUnzdgNtEXmW0Tz/PUKo99C965428=";
};
separateDebugInfo = true;
enableParallelBuilding = true;
# Upstream's configure script is not autoconf generated, but a hand written one.
setOutputFlags = false;
dontDisableStatic = true;
dontAddStaticConfigureFlags = true;
configureFlags = [
"--includedir=${placeholder "dev"}/include"
"--mandir=${placeholder "man"}/share/man"
];
# mysterious link failure
hardeningDisable = [ "trivialautovarinit" ];
# Doesn't recognize platform flags
configurePlatforms = [ ];
outputs = [
"out"
"bin"
"dev"
"man"
];
postInstall = ''
# Always builds both static and dynamic libraries, so we need to remove the
# libraries that don't match stdenv type.
rm $out/lib/liburing*${if stdenv.hostPlatform.isStatic then ".so*" else ".a"}
# Copy the examples into $bin. Most reverse dependency of
# this package should reference only the $out output
for file in $(find ./examples -executable -type f); do
install -Dm555 -t "$bin/bin" "$file"
done
'';
meta = with lib; {
description = "Userspace library for the Linux io_uring API";
homepage = "https://github.com/axboe/liburing";
license = licenses.lgpl21;
platforms = platforms.linux;
maintainers = with maintainers; [
thoughtpolice
nickcao
];
};
}