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