Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl, autoconf }: 2 3stdenv.mkDerivation rec { 4 version = "1.99.8"; 5 pname = "dd_rescue"; 6 7 src = fetchurl { 8 sha256 = "1gbxm8gr9sx5g1q9dycs21hkxikcy97q09lp1lvs59pnd9qpdnwh"; 9 url="http://www.garloff.de/kurt/linux/ddrescue/${pname}-${version}.tar.bz2"; 10 }; 11 12 dd_rhelp_src = fetchurl { 13 url = "http://www.kalysto.org/pkg/dd_rhelp-0.3.0.tar.gz"; 14 sha256 = "0br6fs23ybmic3i5s1w4k4l8c2ph85ax94gfp2lzjpxbvl73cz1g"; 15 }; 16 17 buildInputs = [ autoconf ]; 18 19 preBuild = '' 20 substituteInPlace Makefile \ 21 --replace "\$(DESTDIR)/usr" "$out" \ 22 --replace "-o root" "" \ 23 --replace "-g root" "" 24 ''; 25 makeFlags = [ "LIBDIR=$out" ]; 26 27 postInstall = '' 28 mkdir -p "$out/share/dd_rescue" "$out/bin" 29 tar xf "${dd_rhelp_src}" -C "$out/share/dd_rescue" 30 cp "$out/share/dd_rescue"/dd_rhelp*/dd_rhelp "$out/bin" 31 ''; 32 33 meta = with lib; { 34 description = "A tool to copy data from a damaged block device"; 35 maintainers = with maintainers; [ raskin domenkozar ]; 36 platforms = platforms.linux; 37 homepage = "http://www.garloff.de/kurt/linux/ddrescue/"; 38 license = licenses.gpl2Plus; 39 }; 40}