at 22.05-pre 53 lines 1.6 kB view raw
1{ lib, stdenv, fetchgit 2, fetchpatch 3}: 4 5stdenv.mkDerivation rec { 6 pname = "liburing"; 7 version = "2.1"; 8 9 src = fetchgit { 10 url = "http://git.kernel.dk/${pname}"; 11 rev = "liburing-${version}"; 12 sha256 = "sha256-7wSpKqjIdQeOdsQu4xN3kFHV49n6qQ3xVbjUcY1tmas="; 13 }; 14 15 separateDebugInfo = true; 16 enableParallelBuilding = true; 17 # Upstream's configure script is not autoconf generated, but a hand written one. 18 setOutputFlags = false; 19 preConfigure = 20 # We cannot use configureFlags or configureFlagsArray directly, since we 21 # don't have structuredAttrs yet and using placeholder causes permissions 22 # denied errors. Using $dev / $man in configureFlags causes bash evaluation 23 # errors 24 '' 25 configureFlagsArray+=( 26 "--includedir=$dev/include" 27 "--mandir=$man/share/man" 28 ) 29 ''; 30 31 # Doesn't recognize platform flags 32 configurePlatforms = []; 33 34 outputs = [ "out" "bin" "dev" "man" ]; 35 36 postInstall = '' 37 # Copy the examples into $bin. Most reverse dependency of this package should 38 # reference only the $out output 39 mkdir -p $bin/bin 40 cp ./examples/io_uring-cp examples/io_uring-test $bin/bin 41 cp ./examples/link-cp $bin/bin/io_uring-link-cp 42 '' + lib.optionalString stdenv.hostPlatform.isGnu '' 43 cp ./examples/ucontext-cp $bin/bin/io_uring-ucontext-cp 44 ''; 45 46 meta = with lib; { 47 description = "Userspace library for the Linux io_uring API"; 48 homepage = "https://git.kernel.dk/cgit/liburing/"; 49 license = licenses.lgpl21; 50 platforms = platforms.linux; 51 maintainers = with maintainers; [ thoughtpolice ]; 52 }; 53}