2023-11-16 04:20:00 +00:00
|
|
|
{ lib, stdenv, fetchgit }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "liburing";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "2.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "http://git.kernel.dk/${pname}";
|
2020-07-18 16:06:22 +00:00
|
|
|
rev = "liburing-${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
sha256 = "sha256-hPyEZ0P1rfos53OCNd2OYFiqmv6TgpWaj5/xPLccCvM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
separateDebugInfo = true;
|
|
|
|
enableParallelBuilding = true;
|
2020-10-07 09:15:18 +00:00
|
|
|
# Upstream's configure script is not autoconf generated, but a hand written one.
|
|
|
|
setOutputFlags = false;
|
2023-07-15 17:15:38 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--includedir=${placeholder "dev"}/include"
|
|
|
|
"--mandir=${placeholder "man"}/share/man"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
# Doesn't recognize platform flags
|
|
|
|
configurePlatforms = [];
|
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
outputs = [ "out" "bin" "dev" "man" ];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postInstall = ''
|
|
|
|
# Copy the examples into $bin. Most reverse dependency of this package should
|
|
|
|
# reference only the $out output
|
2020-10-07 09:15:18 +00:00
|
|
|
mkdir -p $bin/bin
|
|
|
|
cp ./examples/io_uring-cp examples/io_uring-test $bin/bin
|
|
|
|
cp ./examples/link-cp $bin/bin/io_uring-link-cp
|
2021-12-06 16:07:01 +00:00
|
|
|
'' + lib.optionalString stdenv.hostPlatform.isGnu ''
|
2020-10-07 09:15:18 +00:00
|
|
|
cp ./examples/ucontext-cp $bin/bin/io_uring-ucontext-cp
|
2021-12-06 16:07:01 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Userspace library for the Linux io_uring API";
|
|
|
|
homepage = "https://git.kernel.dk/cgit/liburing/";
|
|
|
|
license = licenses.lgpl21;
|
|
|
|
platforms = platforms.linux;
|
2023-07-15 17:15:38 +00:00
|
|
|
maintainers = with maintainers; [ thoughtpolice nickcao ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|