2020-04-29 06:58:15 +01:00
|
|
|
{ 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
|
|
|
|
] ++ stdenv.lib.optionals doCheck [ strace which ];
|
|
|
|
|
|
|
|
# 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;
|
|
|
|
|
|
|
|
meta = with stdenv.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
|
|
|
};
|
|
|
|
}
|