2014-03-06 15:15:44 +01:00
|
|
|
{ stdenv, fetchurl, autoconf }:
|
2010-11-22 09:40:10 +01:00
|
|
|
|
2014-03-06 15:15:44 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2018-05-02 00:07:50 +02:00
|
|
|
version = "1.99.8";
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "dd_rescue";
|
2014-03-06 15:15:44 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-05-02 00:07:50 +02:00
|
|
|
sha256 = "1gbxm8gr9sx5g1q9dycs21hkxikcy97q09lp1lvs59pnd9qpdnwh";
|
2019-08-15 14:41:18 +02:00
|
|
|
url="http://www.garloff.de/kurt/linux/ddrescue/${pname}-${version}.tar.bz2";
|
2010-11-22 09:40:10 +01:00
|
|
|
};
|
|
|
|
|
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";
|
|
|
|
};
|
2010-11-22 09:40:10 +01:00
|
|
|
|
2014-03-06 15:15:44 +01:00
|
|
|
buildInputs = [ autoconf ];
|
2010-11-22 09:40:10 +01:00
|
|
|
|
2014-03-06 15:15:44 +01:00
|
|
|
preBuild = ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace "\$(DESTDIR)/usr" "$out" \
|
|
|
|
--replace "-o root" "" \
|
2018-09-12 22:03:47 +02:00
|
|
|
--replace "-g root" ""
|
2014-03-06 15:15:44 +01:00
|
|
|
'';
|
|
|
|
makeFlags = [ "LIBDIR=$out" ];
|
2010-11-22 09:40:10 +01:00
|
|
|
|
2014-03-06 15:15:44 +01:00
|
|
|
postInstall = ''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p "$out/share/dd_rescue" "$out/bin"
|
2010-11-22 09:40:10 +01: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 15:15:44 +01:00
|
|
|
'';
|
2018-09-12 22:03:47 +02:00
|
|
|
|
2014-03-06 15:15:44 +01:00
|
|
|
meta = with stdenv.lib; {
|
2010-11-22 09:40:10 +01:00
|
|
|
description = "A tool to copy data from a damaged block device";
|
2016-05-17 13:57:28 +02:00
|
|
|
maintainers = with maintainers; [ raskin domenkozar ];
|
2015-11-17 21:29:29 +01:00
|
|
|
platforms = platforms.linux;
|
2018-09-12 22:03:47 +02:00
|
|
|
homepage = "http://www.garloff.de/kurt/linux/ddrescue/";
|
|
|
|
license = licenses.gpl2Plus;
|
2014-08-31 18:21:45 +02:00
|
|
|
inherit version;
|
|
|
|
updateWalker = true;
|
2010-11-22 09:40:10 +01:00
|
|
|
};
|
2014-03-06 15:15:44 +01:00
|
|
|
}
|