1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/tools/cd-dvd/dvdisaster/default.nix
2015-12-27 06:37:00 +01:00

67 lines
1.9 KiB
Nix

{ stdenv, fetchurl, pkgconfig, gettext, which
, glib, gtk2
, enableSoftening ? true
}:
let version = "0.79.5"; in
stdenv.mkDerivation rec {
name = "dvdisaster-${version}";
src = fetchurl {
url = "http://dvdisaster.net/downloads/${name}.tar.bz2";
sha256 = "0f8gjnia2fxcbmhl8b3qkr5b7idl8m855dw7xw2fnmbqwvcm6k4w";
};
nativeBuildInputs = [ gettext pkgconfig which ];
buildInputs = [ glib gtk2 ];
patches = stdenv.lib.optional enableSoftening [
./encryption.patch
./dvdrom.patch
];
postPatch = ''
patchShebangs ./
sed -i 's/dvdisaster48.png/dvdisaster/' contrib/dvdisaster.desktop
'';
configureFlags = [
# Explicit --docdir= is required for on-line help to work:
"--docdir=$out/share/doc"
"--with-nls=yes"
"--with-embedded-src-path=no"
] ++ stdenv.lib.optional (builtins.elem stdenv.system
stdenv.lib.platforms.x86_64) "--with-sse2=yes";
buildInputs = [
pkgconfig which gettext intltool
glib gtk2
];
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; {
inherit version;
homepage = http://dvdisaster.net/;
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.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ jgeerds nckx ];
};
}