btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / li / libaio / package.nix
blob080571ad71d1a4bb20b635e52494f7d43ea628dd
1 { lib, stdenv, fetchurl }:
3 stdenv.mkDerivation rec {
4   version = "0.3.113";
5   pname = "libaio";
7   src = fetchurl {
8     url = "https://pagure.io/libaio/archive/${pname}-${version}/${pname}-${pname}-${version}.tar.gz";
9     sha256 = "sha256-cWxwWXAyRzROsGa1TsvDyiE08BAzBxkubCt9q1+VKKs=";
10   };
12   postPatch = ''
13     patchShebangs harness
15     # Makefile is too optimistic, gcc is too smart
16     substituteInPlace harness/Makefile \
17       --replace "-Werror" ""
18   '';
20   makeFlags = [
21     "prefix=${placeholder "out"}"
22   ] ++ lib.optional stdenv.hostPlatform.isStatic "ENABLE_SHARED=0";
24   hardeningDisable = lib.optional (stdenv.hostPlatform.isi686) "stackprotector";
26   checkTarget = "partcheck"; # "check" needs root
28   meta = {
29     description = "Library for asynchronous I/O in Linux";
30     homepage = "https://lse.sourceforge.net/io/aio.html";
31     platforms = lib.platforms.linux;
32     license = lib.licenses.lgpl21;
33     maintainers = [ ];
34   };