2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, strace, which }:
|
2013-02-09 23:08:29 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-04-29 06:58:15 +01:00
|
|
|
pname = "libeatmydata";
|
|
|
|
version = "105";
|
2020-02-22 10:16:29 +00:00
|
|
|
|
2020-04-29 06:58:15 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "stewartsmith";
|
|
|
|
repo = pname;
|
|
|
|
rev = "${pname}-${version}";
|
|
|
|
sha256 = "0sx803h46i81h67xbpd3c7ky0nhaw4gij214nsx4lqig70223v9r";
|
2013-02-09 23:08:29 +00:00
|
|
|
};
|
|
|
|
|
2020-02-22 10:16:29 +00:00
|
|
|
patches = [ ./find-shell-lib.patch ];
|
2020-04-29 06:58:15 +01:00
|
|
|
|
2020-02-22 10:16:29 +00:00
|
|
|
patchFlags = "-p0";
|
2020-04-29 06:58:15 +01:00
|
|
|
|
2020-02-22 10:16:29 +00:00
|
|
|
postPatch = ''
|
2020-04-29 06:58:15 +01:00
|
|
|
substituteInPlace eatmydata.in \
|
|
|
|
--replace NIX_OUT_DIR $out
|
|
|
|
|
|
|
|
patchShebangs .
|
2015-07-06 16:46:28 +01:00
|
|
|
'';
|
|
|
|
|
2020-04-29 06:58:15 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
2021-01-21 17:00:13 +00:00
|
|
|
] ++ lib.optionals doCheck [ strace which ];
|
2020-04-29 06:58:15 +01:00
|
|
|
|
|
|
|
# while we can *build* in parallel, the tests also run in parallel which does
|
|
|
|
# not work with v105. Later versions (unreleased) have a fix for that. The
|
|
|
|
# problem is that on hydra we cannot use strace, so the tests don't run there.
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2013-02-09 23:08:29 +00:00
|
|
|
description = "Small LD_PRELOAD library to disable fsync and friends";
|
2020-04-29 06:58:15 +01:00
|
|
|
homepage = "https://www.flamingspork.com/projects/libeatmydata/";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.unix;
|
2013-02-09 23:08:29 +00:00
|
|
|
};
|
|
|
|
}
|