From 7db1dff736026c8ba2a64aef09161bdbc43d46d2 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Tue, 30 Apr 2024 21:53:13 -0400 Subject: [PATCH] liburing: install all examples --- .../development/libraries/liburing/default.nix | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/pkgs/development/libraries/liburing/default.nix b/pkgs/development/libraries/liburing/default.nix index 2fd54747f823..151305630b82 100644 --- a/pkgs/development/libraries/liburing/default.nix +++ b/pkgs/development/libraries/liburing/default.nix @@ -34,17 +34,13 @@ stdenv.mkDerivation rec { "man" ]; - 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 - ''; + postInstall = '' + # Copy the examples into $bin. Most reverse dependency of + # this package should reference only the $out output + for file in $(find ./examples -executable -type f); do + install -Dm555 -t "$bin/bin" "$file" + done + ''; meta = with lib; { description = "Userspace library for the Linux io_uring API";