summaryrefslogtreecommitdiffstats
path: root/pkgs/tools/cd-dvd/dvdisaster
diff options
context:
space:
mode:
authorJascha Geerds <jg@ekby.de>2015-04-27 23:50:56 +0200
committerJascha Geerds <jg@ekby.de>2015-04-28 00:01:49 +0200
commit00ab10de74bb8d67d426e6181cdad904e607c95a (patch)
treed12a9080e8366189453e606515dfbbb658bf1572 /pkgs/tools/cd-dvd/dvdisaster
parent169efee101d0ab56269d82991bdf6faed3523ede (diff)
dvdisaster: Apply debian's patches to allow ROM type and encrypted DVDs
Diffstat (limited to 'pkgs/tools/cd-dvd/dvdisaster')
-rw-r--r--pkgs/tools/cd-dvd/dvdisaster/default.nix22
-rw-r--r--pkgs/tools/cd-dvd/dvdisaster/dvdrom.patch19
-rw-r--r--pkgs/tools/cd-dvd/dvdisaster/encryption.patch21
3 files changed, 57 insertions, 5 deletions
diff --git a/pkgs/tools/cd-dvd/dvdisaster/default.nix b/pkgs/tools/cd-dvd/dvdisaster/default.nix
index 1bdf363300b6..472ef056f1f1 100644
--- a/pkgs/tools/cd-dvd/dvdisaster/default.nix
+++ b/pkgs/tools/cd-dvd/dvdisaster/default.nix
@@ -1,5 +1,6 @@
{ stdenv, fetchurl, pkgconfig, which, gettext, intltool
, glib, gtk2
+, enableSoftening ? true
}:
stdenv.mkDerivation rec {
@@ -10,6 +11,11 @@ stdenv.mkDerivation rec {
sha256 = "e9787dea39aeafa38b26604752561bc895083c17b588489d857ac05c58be196b";
};
+ patches = stdenv.lib.optional enableSoftening [
+ ./encryption.patch
+ ./dvdrom.patch
+ ];
+
postPatch = ''
patchShebangs ./
'';
@@ -22,11 +28,17 @@ stdenv.mkDerivation rec {
glib gtk2
];
- meta = {
+ meta = with stdenv.lib; {
homepage = http://dvdisaster.net/;
- description =
- "Stores data on CD/DVD/BD in a way that it is fully recoverable even " +
- "after some read errors have developed";
- license = stdenv.lib.licenses.gpl2;
+ description = "data loss/scratch/aging protection for CD/DVD media";
+ longDescription = ''
+ dvdisaster provides a margin of safety against data loss on CD and
+ DVD media caused by scratches or aging media. It creates error correction
+ data which is used to recover unreadable sectors if the disc becomes
+ damaged at a later time.
+ '';
+ license = licenses.gpl2;
+ platforms = platforms.linux;
+ maintainers = with maintainers; [ jgeerds ];
};
}
diff --git a/pkgs/tools/cd-dvd/dvdisaster/dvdrom.patch b/pkgs/tools/cd-dvd/dvdisaster/dvdrom.patch
new file mode 100644
index 000000000000..ce3f3de2bc03
--- /dev/null
+++ b/pkgs/tools/cd-dvd/dvdisaster/dvdrom.patch
@@ -0,0 +1,19 @@
+Author: Corey Wright <undefined@pobox.com>
+Description: Adds support for DVD-ROM medium-type.
+
+Index: dvdisaster/scsi-layer.c
+===================================================================
+--- dvdisaster.orig/scsi-layer.c 2012-03-06 11:10:17.147044691 +0900
++++ dvdisaster/scsi-layer.c 2012-03-06 11:10:30.927044292 +0900
+@@ -913,6 +913,11 @@
+ break;
+ }
+
++ if(layer_type & 0x01)
++ { dh->typeDescr = g_strdup("DVD-ROM");
++ break;
++ }
++
+ if(layer_type & 0x06) /* strange thing: (re-)writeable but neither plus nor dash */
+ { dh->typeDescr = g_strdup("DVD-ROM (fake)");
+ dh->subType = DVD;
diff --git a/pkgs/tools/cd-dvd/dvdisaster/encryption.patch b/pkgs/tools/cd-dvd/dvdisaster/encryption.patch
new file mode 100644
index 000000000000..a9383cb13cfe
--- /dev/null
+++ b/pkgs/tools/cd-dvd/dvdisaster/encryption.patch
@@ -0,0 +1,21 @@
+Author: n/a
+Description: Disables to skip on encrypted disks (e.g. DVD with CSS-Encryption).
+
+Index: dvdisaster/scsi-layer.c
+===================================================================
+--- dvdisaster.orig/scsi-layer.c 2012-04-08 21:51:10.995588783 +0900
++++ dvdisaster/scsi-layer.c 2012-04-08 21:51:29.259678075 +0900
+@@ -2693,11 +2693,12 @@
+ return NULL;
+ }
+ }
+-
++/*
+ if(dh->mainType == DVD && query_copyright(dh))
+ { CloseDevice(dh);
+ Stop(_("This software does not support encrypted media.\n"));
+ }
++*/
+
+ /* Create the bitmap of simulated defects */
+