@@ -1,16 +1,54 @@
11{ stdenv, fetchgit
2+, fetchpatch
23}:
34
45stdenv.mkDerivation rec {
56 name = "liburing-${version}";
6− version = "1.0.0pre156_${builtins.substring 0 7 src.rev}";
7+ version = "0.1";
78
89 src = fetchgit {
910 url = "http://git.kernel.dk/liburing";
10− rev = "c31c7ec4bcd7bb0d7b28897d730431c02b9d4ea1";
11− sha256 = "17d6s03fyajcrijca9d2d6llbf8cl8dyalpxnl39az3452p04s11";
11+ rev = "refs/tags/liburing-${version}";
12+ sha256 = "038iqsbm9bdmlwvmb899bc6g1rw5dalr990azynbvgn8qs5adysh";
1213 };
1314
15+ patches = [
16+
17+ # This patch re-introduces support for aarch64-linux, by adding the
18+ # necessary memory barrier primitives for it to work.
19+ #
20+ # Already upstream: remove when moving to the next version
21+ (fetchpatch {
22+ url = "http://git.kernel.dk/cgit/liburing/patch/?id=0520db454c29f1d96cda6cf6cedeb93df65301e8";
23+ sha256 = "1i8133sb1imzxpplmhlhnaxkffgplhj40vanivc6clbibvhgwpq6";
24+ })
25+
26+ # This patch shuffles the name of the io_uring memory barrier primitives.
27+ # They were using extremely common names by accident, which caused
28+ # namespace conflicts with many other projects using the same names. Note:
29+ # this does not change the user-visible API of liburing (liburing is
30+ # designed exactly to hide the necessary memory barriers when using the
31+ # io_uring syscall directly). It only changes the names of some internals.
32+ # The only reason this caused problems at all is because memory barrier
33+ # primitives are written as preprocessor defines, in a common header file,
34+ # which get included unilaterally.
35+ #
36+ # Already upstream: remove when moving to the next version
37+ (fetchpatch {
38+ url = "http://git.kernel.dk/cgit/liburing/patch/?id=552c6a08d04c74d20eeaa86f535bfd553b352370";
39+ sha256 = "123d6jdqfy7b8aq9f6ax767n48hhbx6pln3nlrp623595i8zz3wf";
40+ })
41+
42+ # Finally, this patch fixes the aarch64-linux support introduced by the
43+ # first patch, but which was _broken_ by the second patch, in a horrid
44+ # twist of fate: it neglected to change the names of the aarch64 barriers
45+ # appropriately. (I assume the author did not attempt to compile for
46+ # aarch64, hence this regression)
47+ #
48+ # Not yet upstream: TBD.
49+ ./fix-aarch64-barrier-names.patch
50+ ];
51+
1452 separateDebugInfo = true;
1553 enableParallelBuilding = true;
1654