1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-23 07:26:54 +00:00
nixpkgs/pkgs/tools/system/dd_rescue/default.nix

43 lines
1.2 KiB
Nix
Raw Normal View History

2014-03-06 14:15:44 +00:00
{ stdenv, fetchurl, autoconf }:
2014-03-06 14:15:44 +00:00
stdenv.mkDerivation rec {
2018-05-01 23:07:50 +01:00
version = "1.99.8";
pname = "dd_rescue";
2014-03-06 14:15:44 +00:00
src = fetchurl {
2018-05-01 23:07:50 +01:00
sha256 = "1gbxm8gr9sx5g1q9dycs21hkxikcy97q09lp1lvs59pnd9qpdnwh";
url="http://www.garloff.de/kurt/linux/ddrescue/${pname}-${version}.tar.bz2";
};
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";
};
2014-03-06 14:15:44 +00:00
buildInputs = [ autoconf ];
2014-03-06 14:15:44 +00:00
preBuild = ''
substituteInPlace Makefile \
--replace "\$(DESTDIR)/usr" "$out" \
--replace "-o root" "" \
--replace "-g root" ""
2014-03-06 14:15:44 +00:00
'';
makeFlags = [ "LIBDIR=$out" ];
2014-03-06 14:15:44 +00: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 14:15:44 +00:00
'';
2014-03-06 14:15:44 +00:00
meta = with stdenv.lib; {
description = "A tool to copy data from a damaged block device";
maintainers = with maintainers; [ raskin domenkozar ];
platforms = platforms.linux;
homepage = "http://www.garloff.de/kurt/linux/ddrescue/";
license = licenses.gpl2Plus;
2014-08-31 17:21:45 +01:00
inherit version;
updateWalker = true;
};
2014-03-06 14:15:44 +00:00
}