2019-04-22 16:42:23 +01:00
|
|
|
{ stdenv, fetchgit
|
liburing: bump to 0.1 tag + some extra patches
Normally changing the version of the tag in this manner would be nasty
for users -- `nix-env -u` would not see this as an upgrade on the
channel, for instance, if you had a previous version installed. But
liburing is a *library* and does not really come included with any
useful end-user tools. Most cases will use it directly as a build
dependency, in which case, an appropriate rebuild will happen anyway.
This also re-introduces AArch64 builds, which was previously broken due
to some internal changes requiring memory barrier support. In a twist of
fate, however, this was later broken by another patch, which was written
to fix a *different* regression for users. So we simply apply both of
these patches, as well as a third patch that re-fixes AArch64 support,
which I will submit upstream to Jens. Life is never easy.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-08-20 14:15:08 +01:00
|
|
|
, fetchpatch
|
2019-04-22 16:42:23 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "liburing";
|
2020-04-13 11:46:26 +01:00
|
|
|
version = "0.6pre600_${builtins.substring 0 8 src.rev}";
|
2019-04-22 16:42:23 +01:00
|
|
|
|
|
|
|
src = fetchgit {
|
2019-10-28 18:00:54 +00:00
|
|
|
url = "http://git.kernel.dk/${pname}";
|
2020-04-13 11:46:26 +01:00
|
|
|
rev = "f2e1f3590f7bed3040bd1691676b50839f7d5c39";
|
|
|
|
sha256 = "0wg0pgcbilbb2wg08hsvd18q1m8vdk46b3piz7qb1pvgyq01idj2";
|
2019-04-22 16:42:23 +01:00
|
|
|
};
|
|
|
|
|
2019-05-29 20:21:43 +01:00
|
|
|
separateDebugInfo = true;
|
2019-04-22 16:42:23 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
outputs = [ "out" "lib" "dev" "man" ];
|
|
|
|
|
2019-05-29 03:42:40 +01:00
|
|
|
configurePhase = ''
|
|
|
|
./configure \
|
|
|
|
--prefix=$out \
|
|
|
|
--includedir=$dev/include \
|
|
|
|
--libdir=$lib/lib \
|
|
|
|
--mandir=$man/share/man \
|
|
|
|
'';
|
2019-04-22 16:42:23 +01:00
|
|
|
|
liburing: bump, fix version (1.0.0pre92_7b989f3)
I accidentally got the number of commits wrong in the previous
prerelease version string. This is now fixed.
Generally, this would result in functions like builtins.compareVersions
to give incorrect results, so 'nix-env -u' doesn't work. But I'm
justifying it here, because: most people use it as a library, so the
hash change is all that matters. Plus, I only authored this a week or
so ago in upstream, so this change is fast enough that I think people
will be fine with it and can work around, especially since it's
unreleased in any stable channel.
This also bumps the library to the newest version, which contains some
bugfixes, and now installs the manpages into the $man output for us.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-05-03 01:29:32 +01:00
|
|
|
# Copy the examples into $out.
|
2019-04-22 16:42:23 +01:00
|
|
|
postInstall = ''
|
liburing: bump, fix version (1.0.0pre92_7b989f3)
I accidentally got the number of commits wrong in the previous
prerelease version string. This is now fixed.
Generally, this would result in functions like builtins.compareVersions
to give incorrect results, so 'nix-env -u' doesn't work. But I'm
justifying it here, because: most people use it as a library, so the
hash change is all that matters. Plus, I only authored this a week or
so ago in upstream, so this change is fast enough that I think people
will be fine with it and can work around, especially since it's
unreleased in any stable channel.
This also bumps the library to the newest version, which contains some
bugfixes, and now installs the manpages into the $man output for us.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-05-03 01:29:32 +01:00
|
|
|
mkdir -p $out/bin
|
2019-04-22 16:42:23 +01:00
|
|
|
cp ./examples/io_uring-cp examples/io_uring-test $out/bin
|
2019-05-21 16:35:27 +01:00
|
|
|
cp ./examples/link-cp $out/bin/io_uring-link-cp
|
2019-09-27 18:41:54 +01:00
|
|
|
cp ./examples/ucontext-cp $out/bin/io_uring-ucontext-cp
|
2019-04-22 16:42:23 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Userspace library for the Linux io_uring API";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://git.kernel.dk/cgit/liburing/";
|
2019-04-22 16:42:23 +01:00
|
|
|
license = licenses.lgpl21;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|