From 3a4f647269672b7efb0f377cc9ab4aaa84a07396 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 18 Nov 2021 13:52:57 +0000 Subject: [PATCH] pkgsMusl.liburing: fix build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Musl doesn't have ucontext.h. Quoting getcontext(3): > POSIX.1-2008 removes the specification of getcon‐ text(), citing > portability issues, and recommending that applications be rewritten > to use POSIX threads instead. We should therefore regard ucontext as a GNUism, and only expect the uncontext example to be build for Glibc. --- pkgs/development/libraries/liburing/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/liburing/default.nix b/pkgs/development/libraries/liburing/default.nix index 595f9a5a9cd4..97a0ebda18da 100644 --- a/pkgs/development/libraries/liburing/default.nix +++ b/pkgs/development/libraries/liburing/default.nix @@ -33,16 +33,15 @@ stdenv.mkDerivation rec { outputs = [ "out" "bin" "dev" "man" ]; - postInstall = - # Copy the examples into $bin. Most reverse dependency of this package should - # reference only the $out output - '' + 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 + '' + lib.optionalString stdenv.hostPlatform.isGnu '' cp ./examples/ucontext-cp $bin/bin/io_uring-ucontext-cp - '' - ; + ''; meta = with lib; { description = "Userspace library for the Linux io_uring API";