aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/package/qemu/package.az
blob: fa74ea212d95e58eddb7e768c7a670e4a866f45d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
package qemu {
	description = "a generic and open source machine emulator and virtualizer";
	website = "https://www.qemu.org";
	anitya = 13607;

	version# = "11.0.3";
	source = remoteTar {
		url = "https://download.qemu.org/qemu-"+version+".tar.bz2";
		checksum = "cY1nZe92-WGeOErkkEXU0pDidJxBFgF4JCtUv1IJk0qVUYHw3VSZfVms1NqWfTLq";
		compress = bzip2;
	};
	patches = [
		"disable-mcast-test.patch",
		// fails with ipv6 disabled
		"disable-netdev-socket.patch",
	];

	// configure script uses source as scratch space
	writable = true;
	chmod = true;

	early = `
# tests expect /var/tmp/ to be available
mkdir -p /var/tmp/

# https://gitlab.com/qemu-project/qemu/-/issues/3145
sed -i \
	's,Input/output error,I/O error,g' \
	tests/qemu-iotests/[0-9][0-9][0-9]* \
	tests/qemu-iotests/tests/copy-before-write \
	tests/qemu-iotests/tests/file-io-error.out
cat << EOF > tests/qemu-iotests/150
#!/bin/sh
_notrun 'appears to spuriously fail on zfs'
EOF
`;

	exec = make {
		configure = {
			"disable-download";
			"disable-docs";

			"static";
			"target-list-exclude": join {
				elems = [
					// fails to load firmware
					"ppc-linux-user",
					"ppc64-linux-user",
					"ppc64le-linux-user",
					"ppc-softmmu",
					"ppc64-softmmu",
				];
				sep = ",";
			};
		};

		check = [
			"TIMEOUT_MULTIPLIER=5",
		];
	};

	inputs = [
		bash,
		python,
		python-setuptools,
		python-wheel,
		ninja,
		pkgconf,
		diffutils,

		openssl,
		xz,

		flex,
		bison,
		m4,

		glib,
		zstd,
		dtc,
		kernel-headers,
	];

	runtime = [
		glib,
		zstd,
	];
}