2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch2
|
|
|
|
, autoreconfHook
|
|
|
|
, strace
|
|
|
|
, which
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-05-03 17:38:23 +00:00
|
|
|
pname = "libeatmydata";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "131";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "stewartsmith";
|
|
|
|
repo = pname;
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "sha256-0lrYDW51/KSr809whGwg9FYhzcLRfmoxipIgrK1zFCc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
patches = [
|
|
|
|
# Fixes "error: redefinition of 'open'" on musl
|
2023-07-15 17:15:38 +00:00
|
|
|
(fetchpatch2 {
|
2022-12-02 08:20:57 +00:00
|
|
|
url = "https://raw.githubusercontent.com/void-linux/void-packages/861ac185a6b60134292ff93d40e40b5391d0aa8e/srcpkgs/libeatmydata/patches/musl.patch";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-MZfTgf2Qn94UpPlYNRM2zK99iKQorKQrlbU5/1WJhJM=";
|
2022-12-02 08:20:57 +00:00
|
|
|
})
|
|
|
|
];
|
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
|
|
|
patchShebangs .
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
2023-07-15 17:15:38 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
strace
|
|
|
|
which
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
2020-05-03 17:38:23 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|