2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, strace, which }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-05-03 17:38:23 +00:00
|
|
|
pname = "libeatmydata";
|
|
|
|
version = "105";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "stewartsmith";
|
|
|
|
repo = pname;
|
|
|
|
rev = "${pname}-${version}";
|
|
|
|
sha256 = "0sx803h46i81h67xbpd3c7ky0nhaw4gij214nsx4lqig70223v9r";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./find-shell-lib.patch ];
|
2020-05-03 17:38:23 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
patchFlags = "-p0";
|
2020-05-03 17:38:23 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postPatch = ''
|
2020-05-03 17:38:23 +00:00
|
|
|
substituteInPlace eatmydata.in \
|
|
|
|
--replace NIX_OUT_DIR $out
|
|
|
|
|
|
|
|
patchShebangs .
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
2021-02-05 17:12:51 +00:00
|
|
|
] ++ lib.optionals doCheck [ strace which ];
|
2020-05-03 17:38:23 +00: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-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Small LD_PRELOAD library to disable fsync and friends";
|
2020-05-03 17:38:23 +00:00
|
|
|
homepage = "https://www.flamingspork.com/projects/libeatmydata/";
|
|
|
|
license = licenses.gpl3Plus;
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "eatmydata";
|
2020-05-03 17:38:23 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|