about summary refs log tree commit diff
path: root/pkgs/development/libraries/libeatmydata/default.nix
blob: 2a76731829a7fdbd51d6b6223c7a5681d03f84b8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, strace
, which
}:

stdenv.mkDerivation rec {
  pname = "libeatmydata";
  version = "131";

  src = fetchFromGitHub {
    owner = "stewartsmith";
    repo = pname;
    rev = "refs/tags/v${version}";
    sha256 = "sha256-0lrYDW51/KSr809whGwg9FYhzcLRfmoxipIgrK1zFCc=";
  };

  postPatch = ''
    patchShebangs .
  '';

  nativeBuildInputs = [
    autoreconfHook
  ];

  nativeCheckInputs = [
    strace
    which
  ];

  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;

  enableParallelBuilding = true;

  meta = with lib; {
    description = "Small LD_PRELOAD library to disable fsync and friends";
    homepage = "https://www.flamingspork.com/projects/libeatmydata/";
    license = licenses.gpl3Plus;
    mainProgram = "eatmydata";
    platforms = platforms.unix;
  };
}