2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchgit
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchpatch
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "liburing";
|
2020-07-18 16:06:22 +00:00
|
|
|
version = "0.7";
|
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}";
|
|
|
|
sha256 = "15z44l7y4c6s6dlf7v8lq4znlsjbja2r4ifbni0l8cdcnq0w3zh3";
|
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;
|
|
|
|
preConfigure =
|
|
|
|
# We cannot use configureFlags or configureFlagsArray directly, since we
|
|
|
|
# don't have structuredAttrs yet and using placeholder causes permissions
|
|
|
|
# denied errors. Using $dev / $man in configureFlags causes bash evaluation
|
|
|
|
# errors
|
|
|
|
''
|
|
|
|
configureFlagsArray+=(
|
|
|
|
"--includedir=$dev/include"
|
|
|
|
"--mandir=$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" ];
|
|
|
|
|
|
|
|
postInstall =
|
|
|
|
# Copy the examples into $bin. Most reverse dependency of this package should
|
|
|
|
# reference only the $out output
|
|
|
|
''
|
|
|
|
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
|
|
|
|
cp ./examples/ucontext-cp $bin/bin/io_uring-ucontext-cp
|
|
|
|
''
|
|
|
|
;
|
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;
|
|
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|