summary refs log tree commit diff
path: root/pkgs/development/libraries/liburing
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-08-04 10:43:07 +0000
committerAlyssa Ross <hi@alyssa.is>2021-08-04 10:43:07 +0000
commit62614cbef7da005c1eda8c9400160f6bcd6546b8 (patch)
treec2630f69080637987b68acb1ee8676d2681fe304 /pkgs/development/libraries/liburing
parentd9c82ed3044c72cecf01c6ea042489d30914577c (diff)
parente24069138dfec3ef94f211f1da005bb5395adc11 (diff)
downloadnixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.gz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.bz2
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.lz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.xz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.zst
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.zip
Merge branch 'nixpkgs-update' into master
Diffstat (limited to 'pkgs/development/libraries/liburing')
-rw-r--r--pkgs/development/libraries/liburing/default.nix57
1 files changed, 38 insertions, 19 deletions
diff --git a/pkgs/development/libraries/liburing/default.nix b/pkgs/development/libraries/liburing/default.nix
index e0297812209..ddd7c7b207d 100644
--- a/pkgs/development/libraries/liburing/default.nix
+++ b/pkgs/development/libraries/liburing/default.nix
@@ -1,39 +1,58 @@
-{ stdenv, fetchgit
+{ lib, stdenv, fetchgit
 , fetchpatch
 }:
 
 stdenv.mkDerivation rec {
   pname = "liburing";
-  version = "0.7";
+  version = "2.0";
 
   src = fetchgit {
     url    = "http://git.kernel.dk/${pname}";
     rev    = "liburing-${version}";
-    sha256 = "15z44l7y4c6s6dlf7v8lq4znlsjbja2r4ifbni0l8cdcnq0w3zh3";
+    sha256 = "0has1yd1ns5q5jgcmhrbgwhbwq0wix3p7xv3dyrwdf784p56izkn";
   };
 
+  patches = [
+    # Fix build on 32-bit ARM
+    (fetchpatch {
+      url = "https://github.com/axboe/liburing/commit/808b6c72ab753bda0c300b5683cfd31750d1d49b.patch";
+      sha256 = "1x7a9c5a6rwhfsbjqmhbnwh2aiin6yylckrqdjbzljrprzf11wrd";
+    })
+  ];
+
   separateDebugInfo = true;
   enableParallelBuilding = true;
+  # Upstream's configure script is not autoconf generated, but a hand written one.
+  setOutputFlags = false;
+  preConfigure =
+    # We cannot use configureFlags or configureFlagsArray directly, since we
+    # don't have structuredAttrs yet and using placeholder causes permissions
+    # denied errors. Using $dev / $man in configureFlags causes bash evaluation
+    # errors
+  ''
+    configureFlagsArray+=(
+      "--includedir=$dev/include"
+      "--mandir=$man/share/man"
+    )
+  '';
 
-  outputs = [ "out" "lib" "dev" "man" ];
+  # Doesn't recognize platform flags
+  configurePlatforms = [];
 
-  configurePhase = ''
-    ./configure \
-      --prefix=$out \
-      --includedir=$dev/include \
-      --libdir=$lib/lib \
-      --mandir=$man/share/man \
-  '';
+  outputs = [ "out" "bin" "dev" "man" ];
 
-  # Copy the examples into $out.
-  postInstall = ''
-    mkdir -p $out/bin
-    cp ./examples/io_uring-cp examples/io_uring-test $out/bin
-    cp ./examples/link-cp $out/bin/io_uring-link-cp
-    cp ./examples/ucontext-cp $out/bin/io_uring-ucontext-cp
-  '';
+  postInstall =
+  # Copy the examples into $bin. Most reverse dependency of this package should
+  # reference only the $out output
+  ''
+    mkdir -p $bin/bin
+    cp ./examples/io_uring-cp examples/io_uring-test $bin/bin
+    cp ./examples/link-cp $bin/bin/io_uring-link-cp
+    cp ./examples/ucontext-cp $bin/bin/io_uring-ucontext-cp
+  ''
+  ;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Userspace library for the Linux io_uring API";
     homepage    = "https://git.kernel.dk/cgit/liburing/";
     license     = licenses.lgpl21;