about summary refs log tree commit diff
path: root/pkgs/tools/cd-dvd/dvdisaster/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/cd-dvd/dvdisaster/default.nix')
-rw-r--r--pkgs/tools/cd-dvd/dvdisaster/default.nix33
1 files changed, 28 insertions, 5 deletions
diff --git a/pkgs/tools/cd-dvd/dvdisaster/default.nix b/pkgs/tools/cd-dvd/dvdisaster/default.nix
index 1bdf363300b6..101d69c0903b 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,8 +11,14 @@ stdenv.mkDerivation rec {
     sha256 = "e9787dea39aeafa38b26604752561bc895083c17b588489d857ac05c58be196b";
   };
 
+  patches = stdenv.lib.optional enableSoftening [
+    ./encryption.patch
+    ./dvdrom.patch
+  ];
+
   postPatch = ''
     patchShebangs ./
+    sed -i 's/dvdisaster48.png/dvdisaster/' contrib/dvdisaster.desktop
   '';
 
   # Explicit --docdir= is required for on-line help to work:
@@ -22,11 +29,27 @@ stdenv.mkDerivation rec {
     glib gtk2
   ];
 
-  meta = {
+  postInstall = ''
+    mkdir -pv $out/share/applications
+    cp contrib/dvdisaster.desktop $out/share/applications/
+
+    for size in 16 24 32 48 64; do
+      mkdir -pv $out/share/icons/hicolor/"$size"x"$size"/apps/
+      cp contrib/dvdisaster"$size".png $out/share/icons/hicolor/"$size"x"$size"/apps/dvdisaster.png
+    done
+  '';
+
+  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 ];
   };
 }