diff --git a/pkgs/development/libraries/liburing/default.nix b/pkgs/development/libraries/liburing/default.nix index e0297812209..1839c0ec187 100644 --- a/pkgs/development/libraries/liburing/default.nix +++ b/pkgs/development/libraries/liburing/default.nix @@ -14,24 +14,32 @@ stdenv.mkDerivation rec { separateDebugInfo = true; enableParallelBuilding = true; - - outputs = [ "out" "lib" "dev" "man" ]; - - configurePhase = '' - ./configure \ - --prefix=$out \ - --includedir=$dev/include \ - --libdir=$lib/lib \ - --mandir=$man/share/man \ + # 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" + ) ''; - # 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 - ''; + outputs = [ "out" "bin" "dev" "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 + cp ./examples/ucontext-cp $bin/bin/io_uring-ucontext-cp + '' + ; meta = with stdenv.lib; { description = "Userspace library for the Linux io_uring API";