about summary refs log tree commit diff
path: root/pkgs/tools/filesystems/xfsdump/default.nix
blob: a6867e3c0a5fe868af9a02b176e151ebddb4e820 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{ lib
, stdenv
, fetchurl
, attr
, gettext
, autoconf
, automake
, ncurses
, libtool
, libuuid
, libxfs
}:

stdenv.mkDerivation rec {
  pname = "xfsdump";
  version = "3.1.12";

  src = fetchurl {
    url = "mirror://kernel/linux/utils/fs/xfs/${pname}/${pname}-${version}.tar.xz";
    sha256 = "sha256-85xMGzBrLdfsl5wOlNYP5pCD0uz5rwUcrF7zvtdyx0o=";
  };

  nativeBuildInputs = [
    autoconf
    automake
    gettext
    libtool
  ];
  buildInputs = [
    attr
    libuuid
    libxfs
    ncurses
  ];

  postPatch = ''
    substituteInPlace Makefile \
      --replace "cp include/install-sh ." "cp -f include/install-sh ."
  '';

  # Conifigure scripts don't check PATH, see xfstests derviation
  preConfigure = ''
    export MAKE=$(type -P make)
    export MSGFMT=$(type -P msgfmt)
    export MSGMERGE=$(type -P msgmerge)
    export XGETTEXT=$(type -P xgettext)

    make configure
    patchShebangs ./install-sh
  '';

  meta = with lib; {
    description = "XFS filesystem incremental dump utility";
    homepage = "https://git.kernel.org/pub/scm/fs/xfs/xfsdump-dev.git/tree/doc/CHANGES";
    license = licenses.gpl2Only;
    maintainers = [ maintainers.lunik1 ];
    platforms = platforms.linux;
  };
}