mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-07 20:53:22 +00:00
![Silvan Mosberger](/assets/img/avatar_default.png)
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
107 lines
2.5 KiB
Nix
107 lines
2.5 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
gettext,
|
|
pkg-config,
|
|
which,
|
|
glib,
|
|
gtk2,
|
|
enableSoftening ? true,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "dvdisaster";
|
|
version = "0.79.10";
|
|
|
|
src = fetchurl {
|
|
url = "https://dvdisaster.jcea.es/downloads/${pname}-${version}.tar.bz2";
|
|
hash = "sha256-3Qqf9i8aSL9z2uJvm8P/QOPp83nODC3fyLL1iBIgf+g=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
gettext
|
|
pkg-config
|
|
which
|
|
];
|
|
buildInputs = [
|
|
glib
|
|
gtk2
|
|
];
|
|
|
|
patches = lib.optionals enableSoftening [
|
|
./encryption.patch
|
|
./dvdrom.patch
|
|
];
|
|
|
|
postPatch = ''
|
|
patchShebangs ./
|
|
sed -i 's/dvdisaster48.png/dvdisaster/' contrib/dvdisaster.desktop
|
|
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 ;'
|
|
'';
|
|
|
|
configureFlags = [
|
|
# Explicit --docdir= is required for on-line help to work:
|
|
"--docdir=share/doc"
|
|
"--with-nls=yes"
|
|
"--with-embedded-src-path=no"
|
|
] ++ 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
|
|
'';
|
|
|
|
postInstall = ''
|
|
rm -f $out/bin/dvdisaster-uninstall.sh
|
|
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 lib; {
|
|
homepage = "https://dvdisaster.jcea.es/";
|
|
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 = [ ];
|
|
mainProgram = "dvdisaster";
|
|
};
|
|
}
|