testdisk: deduplicating testdisk/photorec

Testdisk/Photorec has been packaged twice. This deduplicates
the packages by consolidating the packages into one and throwing
an error upon use of the outdated package.

this also adds qphotorec, which was previously not built and ensures
it's wrapped correctly.

Please note that I took the liberty to merge the maintainers lists.
This commit is contained in:
Dima 2019-09-21 16:54:35 +02:00
parent f772fe52c3
commit 10bfa40677
4 changed files with 40 additions and 46 deletions

View File

@ -1,27 +0,0 @@
{ stdenv, fetchurl, ncurses, libjpeg, e2fsprogs, zlib, openssl, libuuid, ntfs3g }:
stdenv.mkDerivation {
name = "testdisk-7.1";
src = fetchurl {
url = https://www.cgsecurity.org/testdisk-7.0.tar.bz2;
sha256 = "0ba4wfz2qrf60vwvb1qsq9l6j0pgg81qgf7fh22siaz649mkpfq0";
};
buildInputs = [ ncurses libjpeg zlib openssl libuuid ]
++ stdenv.lib.optionals (!stdenv.isDarwin) [ e2fsprogs ntfs3g ];
enableParallelBuilding = true;
meta = {
homepage = https://www.cgsecurity.org/wiki/TestDisk;
license = stdenv.lib.licenses.gpl2Plus;
platforms = stdenv.lib.platforms.all;
maintainers = [ stdenv.lib.maintainers.eelco ];
longDescription = ''
TestDisk is a program for data recovery, primarily designed to
help recover lost partitions and/or make non-booting disks
bootable again.
'';
};
}

View File

@ -1,35 +1,51 @@
{ stdenv { mkDerivation
, stdenv
, fetchurl , fetchurl
, ncurses , ncurses
, libuuid , libuuid
, pkgconfig
, libjpeg , libjpeg
, zlib , zlib
, ntfs3g , libewf
, e2fsprogs , enableNtfs ? false, ntfs3g ? null
, enableExtFs ? false, e2fsprogs ? null
, enableQt ? false, qtbase ? null, qttools ? null, qwt ? null
}: }:
stdenv.mkDerivation rec { assert enableNtfs -> ntfs3g != null;
pname = "testdisk-photorec"; assert enableExtFs -> e2fsprogs != null;
version = "7.0"; 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";
src = fetchurl { src = fetchurl {
url = "https://www.cgsecurity.org/testdisk-${version}.tar.bz2"; url = "https://www.cgsecurity.org/testdisk-${version}.tar.bz2";
sha256 = "0ba4wfz2qrf60vwvb1qsq9l6j0pgg81qgf7fh22siaz649mkpfq0"; sha256 = "1zlh44w67py416hkvw6nrfmjickc2d43v51vcli5p374d5sw84ql";
}; };
enableParallelBuilding = true;
buildInputs = [ buildInputs = [
ncurses ncurses
libuuid libuuid
# optional: pkgconfig
libjpeg libjpeg
zlib zlib
ntfs3g libewf
e2fsprogs ]
#libewf # makes it fail to build ++ stdenv.lib.optional enableNtfs ntfs3g
#qt4 # for qphotorec, which does not build in 7.0 ++ stdenv.lib.optional enableExtFs e2fsprogs
]; ++ stdenv.lib.optional enableQt [ qtbase qttools qwt ];
NIX_CFLAGS_COMPILE="-Wno-unused";
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://www.cgsecurity.org/wiki/Main_Page; homepage = https://www.cgsecurity.org/wiki/Main_Page;
downloadPage = https://www.cgsecurity.org/wiki/TestDisk_Download; downloadPage = https://www.cgsecurity.org/wiki/TestDisk_Download;
description = "Data recovery utilities"; description = "Testdisk / Photorec - Data recovery utilities";
longDescription = '' longDescription = ''
TestDisk is a powerful free data recovery software. It was primarily TestDisk is a powerful free data recovery software. It was primarily
designed to help recover lost partitions and/or make non-booting disks designed to help recover lost partitions and/or make non-booting disks
@ -44,8 +60,9 @@ stdenv.mkDerivation rec {
it will still work even if your media's file system has been severely it will still work even if your media's file system has been severely
damaged or reformatted. damaged or reformatted.
''; '';
license = licenses.gpl2; license = stdenv.lib.licenses.gpl2Plus;
maintainers = with maintainers; [ fgaz ]; platforms = stdenv.lib.platforms.all;
maintainers = with maintainers; [ fgaz eelco ];
}; };
} }

View File

@ -364,6 +364,7 @@ mapAliases ({
terraform-provider-libvirt = terraform-providers.libvirt; # added 2018-09-28 terraform-provider-libvirt = terraform-providers.libvirt; # added 2018-09-28
terraform-provider-nixos = terraform-providers.nixos; # added 2018-09-28 terraform-provider-nixos = terraform-providers.nixos; # added 2018-09-28
tesseract_4 = tesseract4; # added 2018-12-19 tesseract_4 = tesseract4; # added 2018-12-19
testdisk-photorec = throw "This package was a duplicate, please use testdisk or testdisk-qt instead"; # added 2019-10-13
tex-gyre-bonum-math = tex-gyre-math.bonum; # added 2018-04-03 tex-gyre-bonum-math = tex-gyre-math.bonum; # added 2018-04-03
tex-gyre-pagella-math = tex-gyre-math.pagella; # added 2018-04-03 tex-gyre-pagella-math = tex-gyre-math.pagella; # added 2018-04-03
tex-gyre-schola-math = tex-gyre-math.schola; # added 2018-04-03 tex-gyre-schola-math = tex-gyre-math.schola; # added 2018-04-03

View File

@ -6409,8 +6409,6 @@ in
termplay = callPackage ../tools/misc/termplay { }; termplay = callPackage ../tools/misc/termplay { };
testdisk-photorec = callPackage ../tools/system/testdisk-photorec { };
tewisay = callPackage ../tools/misc/tewisay { }; tewisay = callPackage ../tools/misc/tewisay { };
texmacs = if stdenv.isDarwin texmacs = if stdenv.isDarwin
@ -6836,7 +6834,12 @@ in
xe = callPackage ../tools/system/xe { }; xe = callPackage ../tools/system/xe { };
testdisk = callPackage ../tools/misc/testdisk { }; testdisk = libsForQt5.callPackage ../tools/system/testdisk {
enableExtFs = !stdenv.isDarwin;
enableNtfs = !stdenv.isDarwin;
};
testdisk-qt = testdisk.override { enableQt = true; };
textql = callPackage ../development/tools/textql { }; textql = callPackage ../development/tools/textql { };