@@ -0,0 +1,40 @@
1+{ stdenv, fetchgit
2+}:
3+
4+stdenv.mkDerivation rec {
5+ name = "liburing-${version}";
6+ version = "1.0.0pre821_${builtins.substring 0 7 src.rev}";
7+
8+ src = fetchgit {
9+ url = "http://git.kernel.dk/liburing";
10+ rev = "39e0ebd4fc66046bf733a47aaa899a556093ebc6";
11+ sha256 = "00c72fizxmwxd2jzmlzi4l82cw7h75lfpkkwzwcjpw9zdg9w0ci7";
12+ };
13+
14+ enableParallelBuilding = true;
15+
16+ outputs = [ "out" "lib" "dev" "man" ];
17+
18+ installFlags =
19+ [ "prefix=$(out)"
20+ "includedir=$(dev)/include"
21+ "libdir=$(lib)/lib"
22+ ];
23+
24+ # Copy the examples into $out and man pages into $man. This should be handled
25+ # by the build system in the future and submitted upstream.
26+ postInstall = ''
27+ mkdir -p $out/bin $man/share/man/man2/
28+ cp -R ./man/* $man/share/man/man2
29+ cp ./examples/io_uring-cp examples/io_uring-test $out/bin
30+ '';
31+
32+ meta = with stdenv.lib; {
33+ description = "Userspace library for the Linux io_uring API";
34+ homepage = http://git.kernel.dk/cgit/liburing/;
35+ license = licenses.lgpl21;
36+ platforms = platforms.linux;
37+ maintainers = with maintainers; [ thoughtpolice ];
38+ badPlatforms = [ "aarch64-linux" ];
39+ };
40+}