@ -39,7 +39,7 @@ let
in
stdenv . mkDerivation rec {
version = " 5 . 2 . 0 " ;
version = " 6 . 0 . 0 " ;
pname = " q e m u "
+ lib . optionalString xenSupport " - x e n "
+ lib . optionalString hostCpuOnly " - h o s t - c p u - o n l y "
@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = " h t t p s : / / d o w n l o a d . q e m u . o r g / q e m u - ${ version } . t a r . x z " ;
sha256 = " 1 g 0 p v x 4 q b i r p c n 9 m n i 7 0 4 y 0 3 n 3 l v k m w 2 c 0 r b c w v y d y r 8 n s 4 x h 6 6 b " ;
sha256 = " 1 f 9 h z 8 r f 1 2 j m 8 b a a 7 k d a 3 4 y l 4 h y l 0 x h 0 c 4 a p 0 3 k r f j x 2 3 i 3 i m g 4 7 " ;
} ;
nativeBuildInputs = [ python python . pkgs . sphinx pkg-config flex bison meson ninja ]
@ -84,126 +84,6 @@ stdenv.mkDerivation rec {
patches = [
./fix-qemu-ga.patch
./9p-ignore-noatime.patch
( fetchpatch {
name = " C V E - 2 0 2 0 - 2 7 8 2 1 . p a t c h " ;
url = " h t t p s : / / s o u r c e s . d e b i a n . o r g / d a t a / m a i n / q / q e m u / 1 : 5 . 2 + d f s g - 1 0 / d e b i a n / p a t c h e s / m e m o r y - c l a m p - c a c h e d - t r a n s l a t i o n - i f - p o i n t s - t o - M M I O - r e g i o n - C V E - 2 0 2 0 - 2 7 8 2 1 . p a t c h " ;
sha256 = " 0 s j 0 k r 0 g 6 j a l y g r 5 m b 9 i 1 7 f g r 4 9 1 j z a x v k 3 d v a l a 0 2 6 8 9 4 0 s 0 1 x 9 " ;
} )
( fetchpatch {
name = " C V E - 2 0 2 1 - 2 0 2 2 1 . p a t c h " ;
url = " h t t p s : / / s o u r c e s . d e b i a n . o r g / d a t a / m a i n / q / q e m u / 1 : 5 . 2 + d f s g - 1 0 / d e b i a n / p a t c h e s / a r m _ g i c - f i x - i n t e r r u p t - I D - i n - G I C D _ S G I R - C V E - 2 0 2 1 - 2 0 2 2 1 . p a t c h " ;
sha256 = " 1 i y v c w 8 7 h z l c 5 7 f g 5 l 8 7 v d d q m c h 8 i w 2 y g h k 0 s 1 2 5 h k 5 s h n 1 b y g j q " ;
} )
( fetchpatch {
name = " C V E - 2 0 2 1 - 2 0 1 8 1 . p a t c h " ;
url = " h t t p s : / / s o u r c e s . d e b i a n . o r g / d a t a / m a i n / q / q e m u / 1 : 5 . 2 + d f s g - 1 0 / d e b i a n / p a t c h e s / 9 p f s - F u l l y - r e s t a r t - u n r e c l a i m - l o o p - C V E - 2 0 2 1 - 2 0 1 8 1 . p a t c h " ;
sha256 = " 1 4 9 i f i a z j 6 r n 4 d 4 m v 2 c 7 l c a y q 7 4 4 f i j s v 5 a b x l b 8 b h b k j 9 9 w d 6 4 f " ;
} )
( fetchpatch {
name = " C V E - 2 0 2 0 - 3 5 5 1 7 . p a r t - 1 . p a t c h " ;
url = " h t t p s : / / s o u r c e s . d e b i a n . o r g / d a t a / m a i n / q / q e m u / 1 : 5 . 2 + d f s g - 1 0 / d e b i a n / p a t c h e s / v i r t i o f s d - e x t r a c t - l o _ d o _ o p e n - f r o m - l o _ o p e n . p a t c h " ;
sha256 = " 0 j 4 w a a z 6 q 5 4 b y 4 a 7 v d 5 m 8 s 2 n 8 y 0 a n 9 h q f 0 n d y c x s y 0 3 g 4 k s m 6 6 9 d " ;
} )
( fetchpatch {
name = " C V E - 2 0 2 0 - 3 5 5 1 7 . p a r t - 2 . p a t c h " ;
url = " h t t p s : / / s o u r c e s . d e b i a n . o r g / d a t a / m a i n / q / q e m u / 1 : 5 . 2 + d f s g - 1 0 / d e b i a n / p a t c h e s / v i r t i o f s d - o p t i o n a l l y - r e t u r n - i n o d e - p o i n t e r - f r o m - l o _ d o _ l o o k u p . p a t c h " ;
sha256 = " 0 8 b a g 8 9 0 r 6 d x 2 r h n q 5 8 g y v s x v z w q g v n 8 3 p j l g 9 5 b 5 i c 0 z 6 g y j n s g " ;
} )
( fetchpatch {
name = " C V E - 2 0 2 0 - 3 5 5 1 7 . p a r t - 3 . p a t c h " ;
url = " h t t p s : / / s o u r c e s . d e b i a n . o r g / d a t a / m a i n / q / q e m u / 1 : 5 . 2 + d f s g - 1 0 / d e b i a n / p a t c h e s / v i r t i o f s d - p r e v e n t - o p e n i n g - o f - s p e c i a l - f i l e s - C V E - 2 0 2 0 - 3 5 5 1 7 . p a t c h " ;
sha256 = " 0 z i y 6 6 3 8 z b k n 0 3 7 l 2 9 y w i r v g y m b q q 6 6 l 5 r n g g 8 i w y k y 6 7 a c i l v 9 4 " ;
} )
( fetchpatch {
name = " C V E - 2 0 2 1 - 2 0 2 6 3 . p a r t - 1 . p a t c h " ;
url = " h t t p s : / / s o u r c e s . d e b i a n . o r g / d a t a / m a i n / q / q e m u / 1 : 5 . 2 + d f s g - 1 0 / d e b i a n / p a t c h e s / v i r t i o f s d - s a v e - e r r o r - c o d e - e a r l y - a t - t h e - f a i l u r e - c a l l s i t e . p a t c h " ;
sha256 = " 1 5 r w b 1 5 y j p c l r q a x k h x 7 6 n p r 8 z l f m 9 m j 4 j b 1 9 c z g 0 9 3 i s 2 c n 4 r y s " ;
} )
( fetchpatch {
name = " C V E - 2 0 2 1 - 2 0 2 6 3 . p a r t - 2 . p a t c h " ;
url = " h t t p s : / / s o u r c e s . d e b i a n . o r g / d a t a / m a i n / q / q e m u / 1 : 5 . 2 + d f s g - 1 0 / d e b i a n / p a t c h e s / v i r t i o f s d - d r o p - r e m a p p e d - s e c u r i t y . c a p a b i l i t y - x a t t r - a s - n e e d e d - C V E - 2 0 2 1 - 2 0 2 6 3 . p a t c h " ;
sha256 = " 0 6 y l z 8 0 i l g 3 0 w l s k d 4 d s j x 6 7 7 f p 5 q r 8 c r a n w l a k v j h r 8 8 b 6 3 0 x w 0 " ;
} )
( fetchpatch {
name = " C V E - 2 0 2 1 - 3 4 1 6 . p a r t - 1 . p a t c h " ;
url = " h t t p s : / / s o u r c e s . d e b i a n . o r g / d a t a / m a i n / q / q e m u / 1 : 5 . 2 + d f s g - 1 0 / d e b i a n / p a t c h e s / n e t - q e m u _ r e c e i v e _ p a c k e t - f o r - l o o p b a c k - i n t r o d u c e . p a t c h " ;
sha256 = " 0 h c p f 0 0 v q p g 9 r c 0 w l 8 c r y 9 0 5 w 0 4 6 1 4 8 4 3 a q i f y b y v 1 5 w b v 1 9 0 g p z " ;
} )
( fetchpatch {
name = " C V E - 2 0 2 1 - 3 4 1 6 . p a r t - 2 . p a t c h " ;
url = " h t t p s : / / s o u r c e s . d e b i a n . o r g / d a t a / m a i n / q / q e m u / 1 : 5 . 2 + d f s g - 1 0 / d e b i a n / p a t c h e s / n e t - q e m u _ r e c e i v e _ p a c k e t - f o r - l o o p b a c k - c a d e n c e _ g e m . p a t c h " ;
sha256 = " 1 2 m j n r v s 6 p 4 g 5 f r z q b 0 8 k 4 h 8 6 h p h d q l k a 9 1 f c m a 2 a 3 m 4 a p 9 8 n r x y " ;
} )
( fetchpatch {
name = " C V E - 2 0 2 1 - 3 4 1 6 . p a r t - 3 . p a t c h " ;
url = " h t t p s : / / s o u r c e s . d e b i a n . o r g / d a t a / m a i n / q / q e m u / 1 : 5 . 2 + d f s g - 1 0 / d e b i a n / p a t c h e s / n e t - q e m u _ r e c e i v e _ p a c k e t - f o r - l o o p b a c k - d p 8 3 9 3 x . p a t c h " ;
sha256 = " 0 2 z 6 q 0 5 7 8 f j 5 5 p h j l g 2 l a r r s x 3 p s c h 2 i x z y 4 7 0 y f 5 7 j l 3 j q 1 d y 6 k " ;
} )
( fetchpatch {
name = " C V E - 2 0 2 1 - 3 4 1 6 . p a r t - 4 . p a t c h " ;
url = " h t t p s : / / s o u r c e s . d e b i a n . o r g / d a t a / m a i n / q / q e m u / 1 : 5 . 2 + d f s g - 1 0 / d e b i a n / p a t c h e s / n e t - q e m u _ r e c e i v e _ p a c k e t - f o r - l o o p b a c k - e 1 0 0 0 . p a t c h " ;
sha256 = " 0 z z b i z 8 i 9 j s 5 2 4 m c d i 7 3 9 c 7 h r s m n 8 2 g n a f r y g i 0 x r d 5 s q f 1 h p 0 8 z " ;
} )
( fetchpatch {
name = " C V E - 2 0 2 1 - 3 4 1 6 . p a r t - 5 . p a t c h " ;
url = " h t t p s : / / s o u r c e s . d e b i a n . o r g / d a t a / m a i n / q / q e m u / 1 : 5 . 2 + d f s g - 1 0 / d e b i a n / p a t c h e s / n e t - q e m u _ r e c e i v e _ p a c k e t - f o r - l o o p b a c k - l a n 9 1 1 8 . p a t c h " ;
sha256 = " 1 f 4 4 v 5 z n d 9 s 7 l 7 w g c 7 1 n b g 8 j w 1 b j q i g a 4 w k z 7 d 7 c p n k v 3 l 7 b 9 k j j " ;
} )
( fetchpatch {
name = " C V E - 2 0 2 1 - 3 4 1 6 . p a r t - 6 . p a t c h " ;
url = " h t t p s : / / s o u r c e s . d e b i a n . o r g / d a t a / m a i n / q / q e m u / 1 : 5 . 2 + d f s g - 1 0 / d e b i a n / p a t c h e s / n e t - q e m u _ r e c e i v e _ p a c k e t - f o r - l o o p b a c k - m s f 2 . p a t c h " ;
sha256 = " 0 4 n 1 r z n 6 g f x d a l p 3 4 9 0 3 y s d h l v x q k f n d n q a y j j 3 i v 1 k 2 7 i 5 p c i d n " ;
} )
( fetchpatch {
name = " C V E - 2 0 2 1 - 3 4 1 6 . p a r t - 7 . p a t c h " ;
url = " h t t p s : / / s o u r c e s . d e b i a n . o r g / d a t a / m a i n / q / q e m u / 1 : 5 . 2 + d f s g - 1 0 / d e b i a n / p a t c h e s / n e t - q e m u _ r e c e i v e _ p a c k e t - f o r - l o o p b a c k - p c n e t . p a t c h " ;
sha256 = " 1 p 9 l s 6 f 8 r 6 h x p r j 8 h a 6 2 7 8 f y d c x j 3 a v 2 9 p 1 h v s z x m a b a z m l 2 g 7 l 2 " ;
} )
( fetchpatch {
name = " C V E - 2 0 2 1 - 3 4 1 6 . p a r t - 8 . p a t c h " ;
url = " h t t p s : / / s o u r c e s . d e b i a n . o r g / d a t a / m a i n / q / q e m u / 1 : 5 . 2 + d f s g - 1 0 / d e b i a n / p a t c h e s / n e t - q e m u _ r e c e i v e _ p a c k e t - f o r - l o o p b a c k - r t l 8 1 3 9 . p a t c h " ;
sha256 = " 0 l m s 1 z n 4 9 k p w b l k p 5 4 w i d j j y 7 f w y h d h 1 x 8 3 2 l 1 j v d s 7 9 l 2 n m 6 i 0 4 " ;
} )
( fetchpatch {
name = " C V E - 2 0 2 1 - 3 4 1 6 . p a r t - 9 . p a t c h " ;
url = " h t t p s : / / s o u r c e s . d e b i a n . o r g / d a t a / m a i n / q / q e m u / 1 : 5 . 2 + d f s g - 1 0 / d e b i a n / p a t c h e s / n e t - q e m u _ r e c e i v e _ p a c k e t - f o r - l o o p b a c k - s u n g e m . p a t c h " ;
sha256 = " 1 m k z y r g s p 9 m l 9 y q z j x d f q n w j r 7 n 0 f d 8 v x b y 4 y p 4 k s r s k y n i 8 y 0 p 4 " ;
} )
( fetchpatch {
name = " C V E - 2 0 2 1 - 3 4 1 6 . p a r t - 1 0 . p a t c h " ;
url = " h t t p s : / / s o u r c e s . d e b i a n . o r g / d a t a / m a i n / q / q e m u / 1 : 5 . 2 + d f s g - 1 0 / d e b i a n / p a t c h e s / n e t - q e m u _ r e c e i v e _ p a c k e t - f o r - l o o p b a c k - t x _ p k t - i o v . p a t c h " ;
sha256 = " 1 p w q q 8 y w 0 6 y 3 p 6 h a h 3 d g j h s q z k 8 0 2 w b n 7 z y a j l a 1 z w d f p i c 6 3 j s s " ;
} )
( fetchpatch {
name = " C V E - 2 0 2 1 - 3 4 0 9 . p a r t - 1 . p a t c h " ;
url = " h t t p s : / / s o u r c e s . d e b i a n . o r g / d a t a / m a i n / q / q e m u / 1 : 5 . 2 + d f s g - 1 0 / d e b i a n / p a t c h e s / s d h c i / d o n t - t r a n s f e r - a n y - d a t a - w h e n - c o m m a n d - t i m e - o u t . p a t c h " ;
sha256 = " 0 w f 1 y h b 9 m q p f g h 9 r v 0 h f f 0 v 1 s w 3 z l 2 v s f g j r b y 4 r 8 j v x d f j r x j 8 s " ;
} )
( fetchpatch {
name = " C V E - 2 0 2 1 - 3 4 0 9 . p a r t - 2 . p a t c h " ;
url = " h t t p s : / / s o u r c e s . d e b i a n . o r g / d a t a / m a i n / q / q e m u / 1 : 5 . 2 + d f s g - 1 0 / d e b i a n / p a t c h e s / s d h c i / d o n t - w r i t e - t o - S D H C _ S Y S A D - r e g i s t e r - w h e n - t r a n s f e r - i s - i n - p r o g r e s s . p a t c h " ;
sha256 = " 1 d d 4 0 5 d s d c 7 f b p 6 8 y f 6 f 3 2 j s 1 a z s v 3 n 5 9 5 c 6 n b x h 2 8 k f h 9 l s p x 4 v " ;
} )
( fetchpatch {
name = " C V E - 2 0 2 1 - 3 4 0 9 . p a r t - 3 . p a t c h " ;
url = " h t t p s : / / s o u r c e s . d e b i a n . o r g / d a t a / m a i n / q / q e m u / 1 : 5 . 2 + d f s g - 1 0 / d e b i a n / p a t c h e s / s d h c i / c o r r e c t l y - s e t - t h e - c o n t r o l l e r - s t a t u s - f o r - A D M A . p a t c h " ;
sha256 = " 0 8 j k 5 1 p f r b n 1 z f y m a h g l l r z i v a j h 2 v 2 q x 0 8 6 8 r v 9 z m g i 0 j l d b k y 6 " ;
} )
( fetchpatch {
name = " C V E - 2 0 2 1 - 3 4 0 9 . p a r t - 4 . p a t c h " ;
url = " h t t p s : / / s o u r c e s . d e b i a n . o r g / d a t a / m a i n / q / q e m u / 1 : 5 . 2 + d f s g - 1 0 / d e b i a n / p a t c h e s / s d h c i / l i m i t - b l o c k - s i z e - o n l y - w h e n - S D H C _ B L K S I Z E - r e g i s t e r - i s - w r i t a b l e . p a t c h " ;
sha256 = " 1 v a l f h w 3 l 8 3 b r 1 c n y 6 n 4 k m r v 0 f 4 1 6 h l 6 2 5 m g g a y q f z 4 p r s k n y h h 7 " ;
} )
( fetchpatch {
name = " C V E - 2 0 2 1 - 3 4 0 9 . p a r t - 5 . p a t c h " ;
url = " h t t p s : / / s o u r c e s . d e b i a n . o r g / d a t a / m a i n / q / q e m u / 1 : 5 . 2 + d f s g - 1 0 / d e b i a n / p a t c h e s / s d h c i / r e s e t - t h e - d a t a - p o i n t e r - o f - s - f i f o _ b u f f e r - w h e n - a - d i f f e r e n t - b l o c k - s i z e - i s - p r o g r a m m e d . p a t c h " ;
sha256 = " 0 1 p 5 q r r 0 0 r h 3 m l w r p 3 q q 5 6 h 7 y h q v 0 w 7 p w 2 c w 0 3 5 n x w 3 m n a p 0 3 v 3 1 " ;
} )
( fetchpatch {
name = " C V E - 2 0 2 1 - 3 3 9 2 . p a t c h " ;
url = " h t t p s : / / s o u r c e s . d e b i a n . o r g / d a t a / m a i n / q / q e m u / 1 : 5 . 2 + d f s g - 1 0 / d e b i a n / p a t c h e s / m p t s a s - r e m o v e - u n u s e d - M P T S A S S t a t e . p e n d i n g - C V E - 2 0 2 1 - 3 3 9 2 . p a t c h " ;
sha256 = " 0 n 7 d n 2 p 1 0 2 c 2 1 m f 3 n c q r n k s 0 w l 5 k a s 6 y s p a f b n 8 j d 0 3 i g n j g c 4 h d " ;
} )
] ++ optional nixosTestRunner ./force-uid0-on-9p.patch
++ optionals stdenv . hostPlatform . isMusl [
( fetchpatch {
@ -234,6 +114,8 @@ stdenv.mkDerivation rec {
patchShebangs .
# avoid conflicts with libc++ include for <version>
mv VERSION QEMU_VERSION
substituteInPlace configure \
- - replace ' $ source_path/VERSION ' ' $ source_path/QEMU_VERSION '
substituteInPlace meson . build \
- - replace " ' V E R S I O N ' " " ' Q E M U _ V E R S I O N ' "
'' + o p t i o n a l S t r i n g s t d e n v . h o s t P l a t f o r m . i s M u s l ''
@ -304,7 +186,7 @@ stdenv.mkDerivation rec {
homepage = " h t t p : / / w w w . q e m u . o r g / " ;
description = " A g e n e r i c a n d o p e n s o u r c e m a c h i n e e m u l a t o r a n d v i r t u a l i z e r " ;
license = licenses . gpl2Plus ;
maintainers = with maintainers ; [ eelco ] ;
platforms = platforms . linux ++ platforms . darwin ;
maintainers = with maintainers ; [ eelco qyliss ] ;
platforms = platforms . unix ;
} ;
}