Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at python-updates 64 lines 1.6 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5}: 6 7stdenv.mkDerivation rec { 8 pname = "liburing"; 9 version = "2.11"; 10 11 src = fetchFromGitHub { 12 owner = "axboe"; 13 repo = "liburing"; 14 tag = "liburing-${version}"; 15 hash = "sha256-V73QP89WMrL2fkPRbo/TSkfO7GeDsCudlw2Ut5baDzA="; 16 }; 17 18 separateDebugInfo = true; 19 enableParallelBuilding = true; 20 # Upstream's configure script is not autoconf generated, but a hand written one. 21 setOutputFlags = false; 22 dontDisableStatic = true; 23 dontAddStaticConfigureFlags = true; 24 configureFlags = [ 25 "--includedir=${placeholder "dev"}/include" 26 "--mandir=${placeholder "man"}/share/man" 27 ]; 28 29 # mysterious link failure 30 hardeningDisable = [ "trivialautovarinit" ]; 31 32 # Doesn't recognize platform flags 33 configurePlatforms = [ ]; 34 35 outputs = [ 36 "out" 37 "bin" 38 "dev" 39 "man" 40 ]; 41 42 postInstall = '' 43 # Always builds both static and dynamic libraries, so we need to remove the 44 # libraries that don't match stdenv type. 45 rm $out/lib/liburing*${if stdenv.hostPlatform.isStatic then ".so*" else ".a"} 46 47 # Copy the examples into $bin. Most reverse dependency of 48 # this package should reference only the $out output 49 for file in $(find ./examples -executable -type f); do 50 install -Dm555 -t "$bin/bin" "$file" 51 done 52 ''; 53 54 meta = with lib; { 55 description = "Userspace library for the Linux io_uring API"; 56 homepage = "https://github.com/axboe/liburing"; 57 license = licenses.lgpl21; 58 platforms = platforms.linux; 59 maintainers = with maintainers; [ 60 thoughtpolice 61 nickcao 62 ]; 63 }; 64}