2014-03-06 14:15:44 +00:00
|
|
|
{ stdenv, fetchurl, autoconf }:
|
2010-11-22 08:40:10 +00:00
|
|
|
|
2014-03-06 14:15:44 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2017-01-02 17:09:23 +00:00
|
|
|
version = "1.99.5";
|
2014-08-31 16:21:45 +00:00
|
|
|
name = "dd_rescue-${version}";
|
2014-03-06 14:15:44 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-01-02 17:09:23 +00:00
|
|
|
sha256 = "0db94piwcdyqhnlhgfs0bfp0gp2mqyrcr2l5nljapgni31qk4p8j";
|
2015-06-14 08:23:18 +00:00
|
|
|
url="http://www.garloff.de/kurt/linux/ddrescue/${name}.tar.bz2";
|
2010-11-22 08:40:10 +00:00
|
|
|
};
|
|
|
|
|
2014-03-06 14:15:44 +00:00
|
|
|
dd_rhelp_src = fetchurl {
|
|
|
|
url = "http://www.kalysto.org/pkg/dd_rhelp-0.3.0.tar.gz";
|
|
|
|
sha256 = "0br6fs23ybmic3i5s1w4k4l8c2ph85ax94gfp2lzjpxbvl73cz1g";
|
|
|
|
};
|
2010-11-22 08:40:10 +00:00
|
|
|
|
2014-03-06 14:15:44 +00:00
|
|
|
buildInputs = [ autoconf ];
|
2010-11-22 08:40:10 +00:00
|
|
|
|
2014-03-06 14:15:44 +00:00
|
|
|
preBuild = ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace "\$(DESTDIR)/usr" "$out" \
|
|
|
|
--replace "-o root" "" \
|
|
|
|
--replace "-g root" ""
|
|
|
|
'';
|
|
|
|
makeFlags = [ "LIBDIR=$out" ];
|
2010-11-22 08:40:10 +00:00
|
|
|
|
2014-03-06 14:15:44 +00:00
|
|
|
postInstall = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p "$out/share/dd_rescue" "$out/bin"
|
2010-11-22 08:40:10 +00:00
|
|
|
tar xf "${dd_rhelp_src}" -C "$out/share/dd_rescue"
|
|
|
|
cp "$out/share/dd_rescue"/dd_rhelp*/dd_rhelp "$out/bin"
|
2014-03-06 14:15:44 +00:00
|
|
|
'';
|
2010-11-22 08:40:10 +00:00
|
|
|
|
2014-03-06 14:15:44 +00:00
|
|
|
meta = with stdenv.lib; {
|
2010-11-22 08:40:10 +00:00
|
|
|
description = "A tool to copy data from a damaged block device";
|
2016-05-17 11:57:28 +00:00
|
|
|
maintainers = with maintainers; [ raskin domenkozar ];
|
2015-11-17 20:29:29 +00:00
|
|
|
platforms = platforms.linux;
|
2014-08-31 16:21:45 +00:00
|
|
|
downloadPage = "http://www.garloff.de/kurt/linux/ddrescue/";
|
|
|
|
inherit version;
|
|
|
|
updateWalker = true;
|
2010-11-22 08:40:10 +00:00
|
|
|
};
|
2014-03-06 14:15:44 +00:00
|
|
|
}
|