btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / xf / xfsdump / package.nix
bloba6867e3c0a5fe868af9a02b176e151ebddb4e820
1 { lib
2 , stdenv
3 , fetchurl
4 , attr
5 , gettext
6 , autoconf
7 , automake
8 , ncurses
9 , libtool
10 , libuuid
11 , libxfs
14 stdenv.mkDerivation rec {
15   pname = "xfsdump";
16   version = "3.1.12";
18   src = fetchurl {
19     url = "mirror://kernel/linux/utils/fs/xfs/${pname}/${pname}-${version}.tar.xz";
20     sha256 = "sha256-85xMGzBrLdfsl5wOlNYP5pCD0uz5rwUcrF7zvtdyx0o=";
21   };
23   nativeBuildInputs = [
24     autoconf
25     automake
26     gettext
27     libtool
28   ];
29   buildInputs = [
30     attr
31     libuuid
32     libxfs
33     ncurses
34   ];
36   postPatch = ''
37     substituteInPlace Makefile \
38       --replace "cp include/install-sh ." "cp -f include/install-sh ."
39   '';
41   # Conifigure scripts don't check PATH, see xfstests derviation
42   preConfigure = ''
43     export MAKE=$(type -P make)
44     export MSGFMT=$(type -P msgfmt)
45     export MSGMERGE=$(type -P msgmerge)
46     export XGETTEXT=$(type -P xgettext)
48     make configure
49     patchShebangs ./install-sh
50   '';
52   meta = with lib; {
53     description = "XFS filesystem incremental dump utility";
54     homepage = "https://git.kernel.org/pub/scm/fs/xfs/xfsdump-dev.git/tree/doc/CHANGES";
55     license = licenses.gpl2Only;
56     maintainers = [ maintainers.lunik1 ];
57     platforms = platforms.linux;
58   };