nixpkgs/pkgs/tools/cd-dvd/dvdisaster/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

98 lines
2.5 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchurl
, gettext
, pkg-config
, which
, glib
, gtk2
, enableSoftening ? true
}:
stdenv.mkDerivation rec {
pname = "dvdisaster";
2022-08-02 11:17:00 +00:00
version = "0.79.10";
src = fetchurl {
url = "https://dvdisaster.jcea.es/downloads/${pname}-${version}.tar.bz2";
2022-08-02 11:17:00 +00:00
hash = "sha256-3Qqf9i8aSL9z2uJvm8P/QOPp83nODC3fyLL1iBIgf+g=";
};
2021-01-17 03:51:22 +00:00
nativeBuildInputs = [ gettext pkg-config which ];
2015-12-27 05:33:35 +00:00
buildInputs = [ glib gtk2 ];
patches = lib.optionals enableSoftening [
./encryption.patch
./dvdrom.patch
];
postPatch = ''
patchShebangs ./
2015-04-27 21:51:46 +00:00
sed -i 's/dvdisaster48.png/dvdisaster/' contrib/dvdisaster.desktop
2017-01-19 16:06:51 +00: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-12-27 05:33:35 +00:00
configureFlags = [
# Explicit --docdir= is required for on-line help to work:
"--docdir=share/doc"
2015-12-27 05:33:35 +00:00
"--with-nls=yes"
"--with-embedded-src-path=no"
2021-01-15 09:19:50 +00:00
] ++ lib.optional (stdenv.hostPlatform.isx86_64) "--with-sse2=yes";
# fatal error: inlined-icons.h: No such file or directory
enableParallelBuilding = false;
doCheck = true;
checkPhase = ''
runHook preCheck
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
runHook postCheck
'';
2015-04-27 21:51:46 +00:00
postInstall = ''
rm -f $out/bin/dvdisaster-uninstall.sh
2015-04-27 21:51:46 +00:00
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 05:33:35 +00:00
cp contrib/dvdisaster"$size".png \
$out/share/icons/hicolor/"$size"x"$size"/apps/dvdisaster.png
2015-04-27 21:51:46 +00:00
done
'';
meta = with lib; {
homepage = "https://dvdisaster.jcea.es/";
2015-04-30 10:08:54 +00:00
description = "Data loss/scratch/aging protection for CD/DVD media";
longDescription = ''
2015-04-30 10:08:54 +00:00
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.
'';
2015-12-27 05:33:35 +00:00
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ ];
};
}