tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
dvdisaster: 0.79.10 -> 0.79.10-pl5
Matteo Pacini
5 months ago
b9378ba0
90d68127
+66
-85
5 changed files
expand all
collapse all
unified
split
pkgs
by-name
dv
dvdisaster
dvdrom.patch
encryption.patch
gcc14-fix.patch
md5sum.patch
package.nix
-19
pkgs/by-name/dv/dvdisaster/dvdrom.patch
···
1
-
Author: Corey Wright <undefined@pobox.com>
2
-
Description: Adds support for DVD-ROM medium-type.
3
-
4
-
Index: dvdisaster/scsi-layer.c
5
-
===================================================================
6
-
--- dvdisaster.orig/scsi-layer.c 2012-03-06 11:10:17.147044691 +0900
7
-
+++ dvdisaster/scsi-layer.c 2012-03-06 11:10:30.927044292 +0900
8
-
@@ -913,6 +913,11 @@
9
-
break;
10
-
}
11
-
12
-
+ if(layer_type & 0x01)
13
-
+ { dh->typeDescr = g_strdup("DVD-ROM");
14
-
+ break;
15
-
+ }
16
-
+
17
-
if(layer_type & 0x06) /* strange thing: (re-)writeable but neither plus nor dash */
18
-
{ dh->typeDescr = g_strdup("DVD-ROM (fake)");
19
-
dh->subType = DVD;
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
-19
pkgs/by-name/dv/dvdisaster/encryption.patch
···
1
-
Author: n/a
2
-
Description: Disables to skip on encrypted disks (e.g. DVD with CSS-Encryption).
3
-
4
-
diff -Naur dvdisaster-0.79.5.orig/scsi-layer.c dvdisaster-0.79.5/scsi-layer.c
5
-
--- dvdisaster-0.79.5.orig/scsi-layer.c 2015-10-28 21:56:57.000000000 +0100
6
-
+++ dvdisaster-0.79.5/scsi-layer.c 2015-12-27 06:19:32.012253661 +0100
7
-
@@ -2712,12 +2712,6 @@
8
-
}
9
-
}
10
-
11
-
- if(dh->mainType == DVD && query_copyright(dh))
12
-
- { CloseImage(image);
13
-
- Stop(_("This software does not support encrypted media.\n"));
14
-
- return NULL;
15
-
- }
16
-
-
17
-
/* Create the bitmap of simulated defects */
18
-
19
-
if(Closure->simulateDefects)
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
-10
pkgs/by-name/dv/dvdisaster/gcc14-fix.patch
···
1
-
diff --git a/scripts/bash-based-configure b/scripts/bash-based-configure
2
-
--- a/scripts/bash-based-configure
3
-
+++ b/scripts/bash-based-configure
4
-
@@ -1364,6 +1364,7 @@ EOF
5
-
6
-
cat >conftest.c <<EOF
7
-
#include <glib.h>
8
-
+#include <stdio.h>
9
-
int main(int argc, char *argv[])
10
-
{ g_malloc(1024);
···
0
0
0
0
0
0
0
0
0
0
+22
pkgs/by-name/dv/dvdisaster/md5sum.patch
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
Just use md5sum
2
+
diff --git a/regtest/common.bash b/regtest/common.bash
3
+
index ce629ff..75abe54 100644
4
+
--- a/regtest/common.bash
5
+
+++ b/regtest/common.bash
6
+
@@ -33,15 +33,7 @@ TMPLOG="$LOGDIR/tmplog.txt"
7
+
8
+
UNAME="$(uname -s)"
9
+
10
+
-if [ "$UNAME" = Darwin ]; then
11
+
- MD5SUM="md5 -r"
12
+
-else
13
+
- MD5SUM=md5sum
14
+
-fi
15
+
-
16
+
-if ! $MD5SUM $RNDSEQ >/dev/null 2>&1; then
17
+
- MD5SUM=../simple-md5sum
18
+
-fi
19
+
+MD5SUM=md5sum
20
+
21
+
nbfailed=0
22
+
+44
-37
pkgs/by-name/dv/dvdisaster/package.nix
···
1
{
2
lib,
3
stdenv,
4
-
fetchurl,
5
gettext,
6
pkg-config,
7
which,
8
glib,
9
-
gtk2,
10
-
enableSoftening ? true,
0
11
}:
12
13
-
stdenv.mkDerivation rec {
0
14
pname = "dvdisaster";
15
-
version = "0.79.10";
16
17
-
src = fetchurl {
18
-
url = "https://dvdisaster.jcea.es/downloads/${pname}-${version}.tar.bz2";
19
-
hash = "sha256-3Qqf9i8aSL9z2uJvm8P/QOPp83nODC3fyLL1iBIgf+g=";
0
0
20
};
21
22
nativeBuildInputs = [
23
gettext
24
pkg-config
25
which
0
26
];
0
27
buildInputs = [
28
glib
29
-
gtk2
0
0
30
];
31
32
-
patches = lib.optionals enableSoftening [
33
-
./encryption.patch
34
-
./dvdrom.patch
35
-
./gcc14-fix.patch
36
];
37
38
postPatch = ''
39
patchShebangs ./
40
sed -i 's/dvdisaster48.png/dvdisaster/' contrib/dvdisaster.desktop
41
-
substituteInPlace scripts/bash-based-configure \
42
-
--replace 'if (make -v | grep "GNU Make") > /dev/null 2>&1 ;' \
43
-
'if make -v | grep "GNU Make" > /dev/null 2>&1 ;'
44
'';
45
46
configureFlags = [
···
49
"--with-nls=yes"
50
"--with-embedded-src-path=no"
51
]
0
0
0
52
++ lib.optional (stdenv.hostPlatform.isx86_64) "--with-sse2=yes";
53
54
-
# fatal error: inlined-icons.h: No such file or directory
55
-
enableParallelBuilding = false;
56
57
doCheck = true;
58
checkPhase = ''
···
61
62
mkdir -p "$TMP"/{log,regtest}
63
substituteInPlace common.bash \
64
-
--replace /dev/shm "$TMP/log" \
65
-
--replace /var/tmp "$TMP"
66
67
-
for test in *.bash; do
68
-
case "$test" in
69
-
common.bash)
70
-
echo "Skipping $test"
71
-
continue ;;
72
-
*)
73
-
echo "Running $test"
74
-
./"$test"
75
-
esac
76
-
done
77
78
popd
79
runHook postCheck
80
'';
81
82
-
postInstall = ''
83
rm -f $out/bin/dvdisaster-uninstall.sh
84
mkdir -pv $out/share/applications
85
cp contrib/dvdisaster.desktop $out/share/applications/
···
91
done
92
'';
93
94
-
meta = with lib; {
95
-
homepage = "https://dvdisaster.jcea.es/";
96
-
description = "Data loss/scratch/aging protection for CD/DVD media";
0
0
0
0
97
longDescription = ''
98
Dvdisaster provides a margin of safety against data loss on CD and
99
DVD media caused by scratches or aging media. It creates error correction
100
data which is used to recover unreadable sectors if the disc becomes
101
damaged at a later time.
0
0
0
0
102
'';
103
-
license = licenses.gpl3Plus;
104
-
platforms = platforms.linux;
105
maintainers = [ ];
106
mainProgram = "dvdisaster";
0
0
0
107
};
108
-
}
···
1
{
2
lib,
3
stdenv,
4
+
fetchFromGitHub,
5
gettext,
6
pkg-config,
7
which,
8
glib,
9
+
gtk3,
10
+
wrapGAppsHook3,
11
+
withGui ? true,
12
}:
13
14
+
stdenv.mkDerivation (finalAttrs: {
15
+
16
pname = "dvdisaster";
17
+
version = "0.79.10-pl5";
18
19
+
src = fetchFromGitHub {
20
+
owner = "speed47";
21
+
repo = "dvdisaster";
22
+
tag = "v${finalAttrs.version}";
23
+
hash = "sha256-lWvZDB08lZb87l4oEbrdtc6Me4mWHiW3DFNXYoYR3a0=";
24
};
25
26
nativeBuildInputs = [
27
gettext
28
pkg-config
29
which
30
+
wrapGAppsHook3
31
];
32
+
33
buildInputs = [
34
glib
35
+
]
36
+
++ lib.optionals withGui [
37
+
gtk3
38
];
39
40
+
patches = [
41
+
./md5sum.patch
0
0
42
];
43
44
postPatch = ''
45
patchShebangs ./
46
sed -i 's/dvdisaster48.png/dvdisaster/' contrib/dvdisaster.desktop
0
0
0
47
'';
48
49
configureFlags = [
···
52
"--with-nls=yes"
53
"--with-embedded-src-path=no"
54
]
55
+
++ lib.optionals (!withGui) [
56
+
"--with-gui=no"
57
+
]
58
++ lib.optional (stdenv.hostPlatform.isx86_64) "--with-sse2=yes";
59
60
+
enableParallelBuilding = true;
0
61
62
doCheck = true;
63
checkPhase = ''
···
66
67
mkdir -p "$TMP"/{log,regtest}
68
substituteInPlace common.bash \
69
+
--replace-fail /dev/shm "$TMP/log" \
70
+
--replace-fail /var/tmp "$TMP"
71
72
+
./runtests.sh
0
0
0
0
0
0
0
0
0
73
74
popd
75
runHook postCheck
76
'';
77
78
+
postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
79
rm -f $out/bin/dvdisaster-uninstall.sh
80
mkdir -pv $out/share/applications
81
cp contrib/dvdisaster.desktop $out/share/applications/
···
87
done
88
'';
89
90
+
# Tests are heavily CPU-bound
91
+
requiredSystemFeatures = [ "big-parallel" ];
92
+
93
+
meta = {
94
+
homepage = "https://github.com/speed47/dvdisaster";
95
+
changelog = "https://github.com/speed47/dvdisaster/blob/v${finalAttrs.version}/CHANGELOG";
96
+
description = "Data loss/scratch/aging protection for CD/DVD media (unofficial version)";
97
longDescription = ''
98
Dvdisaster provides a margin of safety against data loss on CD and
99
DVD media caused by scratches or aging media. It creates error correction
100
data which is used to recover unreadable sectors if the disc becomes
101
damaged at a later time.
102
+
103
+
This version is built on top of the latest upstream version (2021),
104
+
it is backwards compatible with it, and adds a list of improvements,
105
+
such as BD-R support, CLI-only mode, and more.
106
'';
107
+
license = lib.licenses.gpl3Plus;
108
+
platforms = lib.platforms.linux;
109
maintainers = [ ];
110
mainProgram = "dvdisaster";
111
+
# Tests are not parallelized, and take a long time to run (1-3 hours, depending on CPU)
112
+
# Max observed time: ~4 hours on a "big-parallel" builder
113
+
timeout = 4 * 60 * 60;
114
};
115
+
})