2019-09-21 16:54:35 +02:00
|
|
|
{ mkDerivation
|
|
|
|
, stdenv
|
2018-08-23 22:40:54 +02:00
|
|
|
, fetchurl
|
|
|
|
, ncurses
|
|
|
|
, libuuid
|
2019-09-21 16:54:35 +02:00
|
|
|
, pkgconfig
|
2018-08-23 22:40:54 +02:00
|
|
|
, libjpeg
|
|
|
|
, zlib
|
2019-09-21 16:54:35 +02:00
|
|
|
, libewf
|
2019-10-14 13:15:43 +02:00
|
|
|
, enableNtfs ? !stdenv.isDarwin, ntfs3g ? null
|
|
|
|
, enableExtFs ? !stdenv.isDarwin, e2fsprogs ? null
|
2019-09-21 16:54:35 +02:00
|
|
|
, enableQt ? false, qtbase ? null, qttools ? null, qwt ? null
|
2018-08-23 22:40:54 +02:00
|
|
|
}:
|
|
|
|
|
2019-09-21 16:54:35 +02:00
|
|
|
assert enableNtfs -> ntfs3g != null;
|
|
|
|
assert enableExtFs -> e2fsprogs != null;
|
|
|
|
assert enableQt -> qtbase != null;
|
|
|
|
assert enableQt -> qttools != null;
|
|
|
|
assert enableQt -> qwt != null;
|
|
|
|
|
|
|
|
(if enableQt then mkDerivation else stdenv.mkDerivation) rec {
|
|
|
|
pname = "testdisk";
|
|
|
|
version = "7.1";
|
2018-08-23 22:40:54 +02:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.cgsecurity.org/testdisk-${version}.tar.bz2";
|
2019-09-21 16:54:35 +02:00
|
|
|
sha256 = "1zlh44w67py416hkvw6nrfmjickc2d43v51vcli5p374d5sw84ql";
|
2018-08-23 22:40:54 +02:00
|
|
|
};
|
2019-09-21 16:54:35 +02:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2018-08-23 22:40:54 +02:00
|
|
|
buildInputs = [
|
|
|
|
ncurses
|
|
|
|
libuuid
|
|
|
|
libjpeg
|
|
|
|
zlib
|
2019-09-21 16:54:35 +02:00
|
|
|
libewf
|
|
|
|
]
|
|
|
|
++ stdenv.lib.optional enableNtfs ntfs3g
|
|
|
|
++ stdenv.lib.optional enableExtFs e2fsprogs
|
2019-11-10 02:13:39 +01:00
|
|
|
++ stdenv.lib.optionals enableQt [ qtbase qttools qwt ];
|
2019-09-21 16:54:35 +02:00
|
|
|
|
2019-10-14 11:51:57 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
|
2019-09-21 16:54:35 +02:00
|
|
|
NIX_CFLAGS_COMPILE="-Wno-unused";
|
|
|
|
|
2018-08-23 22:40:54 +02:00
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.cgsecurity.org/wiki/Main_Page";
|
|
|
|
downloadPage = "https://www.cgsecurity.org/wiki/TestDisk_Download";
|
2020-10-26 05:08:40 +01:00
|
|
|
description = "Data recovery utilities";
|
2018-08-23 22:40:54 +02:00
|
|
|
longDescription = ''
|
|
|
|
TestDisk is a powerful free data recovery software. It was primarily
|
|
|
|
designed to help recover lost partitions and/or make non-booting disks
|
|
|
|
bootable again when these symptoms are caused by faulty software: certain
|
|
|
|
types of viruses or human error (such as accidentally deleting a
|
|
|
|
Partition Table).
|
|
|
|
|
|
|
|
PhotoRec is a file data recovery software designed to recover lost files
|
|
|
|
including video, documents and archives from hard disks, CD-ROMs, and
|
|
|
|
lost pictures (thus the Photo Recovery name) from digital camera memory.
|
|
|
|
PhotoRec ignores the file system and goes after the underlying data, so
|
|
|
|
it will still work even if your media's file system has been severely
|
|
|
|
damaged or reformatted.
|
|
|
|
'';
|
2019-09-21 16:54:35 +02:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
|
|
|
platforms = stdenv.lib.platforms.all;
|
|
|
|
maintainers = with maintainers; [ fgaz eelco ];
|
2018-08-23 22:40:54 +02:00
|
|
|
};
|
|
|
|
}
|