2015-12-27 06:33:35 +01:00
|
|
|
{ stdenv, fetchurl, pkgconfig, gettext, which
|
2014-09-08 03:29:56 +02:00
|
|
|
, glib, gtk2
|
2015-04-27 23:50:56 +02:00
|
|
|
, enableSoftening ? true
|
2014-09-08 03:29:56 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "dvdisaster";
|
2016-01-24 20:31:44 +01:00
|
|
|
version = "0.79.5";
|
2014-09-08 03:29:56 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 14:41:18 +02:00
|
|
|
url = "http://dvdisaster.net/downloads/${pname}-${version}.tar.bz2";
|
2015-12-27 06:33:35 +01:00
|
|
|
sha256 = "0f8gjnia2fxcbmhl8b3qkr5b7idl8m855dw7xw2fnmbqwvcm6k4w";
|
2014-09-08 03:29:56 +02:00
|
|
|
};
|
|
|
|
|
2015-12-27 06:33:35 +01:00
|
|
|
nativeBuildInputs = [ gettext pkgconfig which ];
|
|
|
|
buildInputs = [ glib gtk2 ];
|
|
|
|
|
2015-04-27 23:50:56 +02:00
|
|
|
patches = stdenv.lib.optional enableSoftening [
|
|
|
|
./encryption.patch
|
|
|
|
./dvdrom.patch
|
|
|
|
];
|
|
|
|
|
2015-01-08 10:26:49 +01:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs ./
|
2015-04-27 23:51:46 +02:00
|
|
|
sed -i 's/dvdisaster48.png/dvdisaster/' contrib/dvdisaster.desktop
|
2017-01-19 17:06:51 +01:00
|
|
|
substituteInPlace scripts/bash-based-configure \
|
|
|
|
--replace 'if (make -v | grep "GNU Make") > /dev/null 2>&1 ;' \
|
|
|
|
'if make -v | grep "GNU Make" > /dev/null 2>&1 ;'
|
2015-01-08 10:26:49 +01:00
|
|
|
'';
|
|
|
|
|
2015-12-27 06:33:35 +01:00
|
|
|
configureFlags = [
|
|
|
|
# Explicit --docdir= is required for on-line help to work:
|
2017-03-07 12:07:29 +01:00
|
|
|
"--docdir=share/doc"
|
2015-12-27 06:33:35 +01:00
|
|
|
"--with-nls=yes"
|
|
|
|
"--with-embedded-src-path=no"
|
2018-03-10 00:31:42 +01:00
|
|
|
] ++ stdenv.lib.optional (stdenv.hostPlatform.isx86_64) "--with-sse2=yes";
|
2015-02-22 16:05:43 +01:00
|
|
|
|
2016-03-29 10:53:36 +02:00
|
|
|
# fatal error: inlined-icons.h: No such file or directory
|
|
|
|
enableParallelBuilding = false;
|
2015-12-27 06:36:30 +01:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
checkPhase = ''
|
|
|
|
pushd regtest
|
|
|
|
|
|
|
|
mkdir -p "$TMP"/{log,regtest}
|
|
|
|
substituteInPlace common.bash \
|
|
|
|
--replace /dev/shm "$TMP/log" \
|
|
|
|
--replace /var/tmp "$TMP"
|
|
|
|
|
|
|
|
for test in *.bash; do
|
|
|
|
case "$test" in
|
|
|
|
common.bash)
|
|
|
|
echo "Skipping $test"
|
|
|
|
continue ;;
|
|
|
|
*)
|
|
|
|
echo "Running $test"
|
|
|
|
./"$test"
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
popd
|
|
|
|
'';
|
2014-09-08 03:29:56 +02:00
|
|
|
|
2015-04-27 23:51:46 +02:00
|
|
|
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/
|
2015-12-27 06:33:35 +01:00
|
|
|
cp contrib/dvdisaster"$size".png \
|
|
|
|
$out/share/icons/hicolor/"$size"x"$size"/apps/dvdisaster.png
|
2015-04-27 23:51:46 +02:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2015-04-27 23:50:56 +02:00
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://dvdisaster.net/";
|
2015-04-30 12:08:54 +02:00
|
|
|
description = "Data loss/scratch/aging protection for CD/DVD media";
|
2015-04-27 23:50:56 +02:00
|
|
|
longDescription = ''
|
2015-04-30 12:08:54 +02:00
|
|
|
Dvdisaster provides a margin of safety against data loss on CD and
|
2015-04-27 23:50:56 +02:00
|
|
|
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.
|
|
|
|
'';
|
2015-12-27 06:33:35 +01:00
|
|
|
license = licenses.gpl3Plus;
|
2015-04-27 23:50:56 +02:00
|
|
|
platforms = platforms.linux;
|
2019-03-12 23:45:33 +01:00
|
|
|
maintainers = with maintainers; [ ];
|
2014-09-08 03:29:56 +02:00
|
|
|
};
|
|
|
|
}
|