git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #7592 from geerds/dvdisaster

dvdisaster: Apply debian's patches, fix desktop file and icons

commit7e25c4ed7f3f7b7093ef6fd23b71f72ba9326267 authorJascha Geerds <jg@ekby.de> dateWed 29 Apr 2015, 23:16 (12 years ago) parent06cf9a91b3fb27
3 files changed+68−5
pkgs/tools/cd-dvd/dvdisaster/default.nix+28−5 pkgs/tools/cd-dvd/dvdisaster/dvdrom.patch+19 pkgs/tools/cd-dvd/dvdisaster/encryption.patch+21
pkgs/tools/cd-dvd/dvdisaster/default.nix+28−5
@@ -1,5 +1,6 @@
11{ stdenv, fetchurl, pkgconfig, which, gettext, intltool
22, glib, gtk2
3+, enableSoftening ? true
34}:
45
56stdenv.mkDerivation rec {
@@ -10,8 +11,14 @@ stdenv.mkDerivation rec {
1011 sha256 = "e9787dea39aeafa38b26604752561bc895083c17b588489d857ac05c58be196b";
1112 };
1213
14+ patches = stdenv.lib.optional enableSoftening [
15+ ./encryption.patch
16+ ./dvdrom.patch
17+ ];
18+
1319 postPatch = ''
1420 patchShebangs ./
21+ sed -i 's/dvdisaster48.png/dvdisaster/' contrib/dvdisaster.desktop
1522 '';
1623
1724 # Explicit --docdir= is required for on-line help to work:
@@ -22,11 +29,27 @@ stdenv.mkDerivation rec {
2229 glib gtk2
2330 ];
2431
25− meta = {
32+ postInstall = ''
33+ mkdir -pv $out/share/applications
34+ cp contrib/dvdisaster.desktop $out/share/applications/
35+
36+ for size in 16 24 32 48 64; do
37+ mkdir -pv $out/share/icons/hicolor/"$size"x"$size"/apps/
38+ cp contrib/dvdisaster"$size".png $out/share/icons/hicolor/"$size"x"$size"/apps/dvdisaster.png
39+ done
40+ '';
41+
42+ meta = with stdenv.lib; {
2643 homepage = http://dvdisaster.net/;
27− description =
28− "Stores data on CD/DVD/BD in a way that it is fully recoverable even " +
29− "after some read errors have developed";
30− license = stdenv.lib.licenses.gpl2;
44+ description = "data loss/scratch/aging protection for CD/DVD media";
45+ longDescription = ''
46+ dvdisaster provides a margin of safety against data loss on CD and
47+ DVD media caused by scratches or aging media. It creates error correction
48+ data which is used to recover unreadable sectors if the disc becomes
49+ damaged at a later time.
50+ '';
51+ license = licenses.gpl2;
52+ platforms = platforms.linux;
53+ maintainers = with maintainers; [ jgeerds ];
3154 };
3255}
pkgs/tools/cd-dvd/dvdisaster/dvdrom.patchnew file+19
@@ -0,0 +1,19 @@
1+Author: Corey Wright <undefined@pobox.com>
2+Description: Adds support for DVD-ROM medium-type.
3+
4+Index: dvdisaster/scsi-layer.c
5+===================================================================
6+--- dvdisaster.orig/scsi-layer.c 2012-03-06 11:10:17.147044691 +0900
7++++ dvdisaster/scsi-layer.c 2012-03-06 11:10:30.927044292 +0900
8+@@ -913,6 +913,11 @@
9+ break;
10+ }
11+
12++ if(layer_type & 0x01)
13++ { dh->typeDescr = g_strdup("DVD-ROM");
14++ break;
15++ }
16++
17+ if(layer_type & 0x06) /* strange thing: (re-)writeable but neither plus nor dash */
18+ { dh->typeDescr = g_strdup("DVD-ROM (fake)");
19+ dh->subType = DVD;
pkgs/tools/cd-dvd/dvdisaster/encryption.patchnew file+21
@@ -0,0 +1,21 @@
1+Author: n/a
2+Description: Disables to skip on encrypted disks (e.g. DVD with CSS-Encryption).
3+
4+Index: dvdisaster/scsi-layer.c
5+===================================================================
6+--- dvdisaster.orig/scsi-layer.c 2012-04-08 21:51:10.995588783 +0900
7++++ dvdisaster/scsi-layer.c 2012-04-08 21:51:29.259678075 +0900
8+@@ -2693,11 +2693,12 @@
9+ return NULL;
10+ }
11+ }
12+-
13++/*
14+ if(dh->mainType == DVD && query_copyright(dh))
15+ { CloseDevice(dh);
16+ Stop(_("This software does not support encrypted media.\n"));
17+ }
18++*/
19+
20+ /* Create the bitmap of simulated defects */
21+