nixpkgs-suyu/pkgs/tools/system/dd_rescue/default.nix

42 lines
1.1 KiB
Nix
Raw Normal View History

2014-03-06 15:15:44 +01:00
{ stdenv, fetchurl, autoconf }:
2014-03-06 15:15:44 +01:00
stdenv.mkDerivation rec {
2015-10-13 18:30:51 +02:00
version = "1.99";
2014-08-31 18:21:45 +02:00
name = "dd_rescue-${version}";
2014-03-06 15:15:44 +01:00
src = fetchurl {
2015-10-13 18:30:51 +02:00
sha256 = "0gkbwssn134fjyyvjvylyvassw4fwv5mbis9gcb969xdc64dfhg1";
url="http://www.garloff.de/kurt/linux/ddrescue/${name}.tar.bz2";
};
2014-03-06 15:15:44 +01:00
dd_rhelp_src = fetchurl {
url = "http://www.kalysto.org/pkg/dd_rhelp-0.3.0.tar.gz";
sha256 = "0br6fs23ybmic3i5s1w4k4l8c2ph85ax94gfp2lzjpxbvl73cz1g";
};
2014-03-06 15:15:44 +01:00
buildInputs = [ autoconf ];
2014-03-06 15:15:44 +01:00
preBuild = ''
substituteInPlace Makefile \
--replace "\$(DESTDIR)/usr" "$out" \
--replace "-o root" "" \
--replace "-g root" ""
'';
makeFlags = [ "LIBDIR=$out" ];
2014-03-06 15:15:44 +01:00
postInstall = ''
mkdir -p "$out/share/dd_rescue" "$out/bin"
tar xf "${dd_rhelp_src}" -C "$out/share/dd_rescue"
cp "$out/share/dd_rescue"/dd_rhelp*/dd_rhelp "$out/bin"
2014-03-06 15:15:44 +01:00
'';
2014-03-06 15:15:44 +01:00
meta = with stdenv.lib; {
description = "A tool to copy data from a damaged block device";
2014-03-06 15:15:44 +01:00
maintainers = with maintainers; [ raskin iElectric ];
platforms = with platforms; linux;
2014-08-31 18:21:45 +02:00
downloadPage = "http://www.garloff.de/kurt/linux/ddrescue/";
inherit version;
updateWalker = true;
};
2014-03-06 15:15:44 +01:00
}