@ -4,14 +4,12 @@
let
generic = lib . makeOverridable ( {
major , minor , sha256 ,
version , sha256 ,
extraNativeBuildInputs ? [ ] ,
extraBuildInputs ? [ ] ,
withGraphviz ? false
} :
let
atLeast = lib . versionAtLeast " ${ major } . ${ minor } " ;
# Patches from the openembedded-core project to build vala without graphviz
# support. We need to apply an additional patch to allow building when the
# header file isn't available at all, but that patch (./gvc-compat.patch)
@ -45,21 +43,21 @@ let
# 0.42.4: https://github.com/openembedded/openembedded-core/raw/f2b4f9ec6f44dced7f88df849cca68961419eeb8/meta/recipes-devtools/vala/vala/disable-graphviz.patch
" 0 . 4 4 " = ./disable-graphviz-0.44.1.patch ;
} . ${ major } or ( throw " n o g r a p h v i z p a t c h f o r t h i s v e r s i o n o f v a l a " ) ;
} . ${ lib . versions . majorMinor version } or ( throw " n o g r a p h v i z p a t c h f o r t h i s v e r s i o n o f v a l a " ) ;
disableGraphviz = a tLeast " 0 . 3 8 " && ! withGraphviz ;
disableGraphviz = lib . versionA tLeast version " 0 . 3 8 " && ! withGraphviz ;
in stdenv . mkDerivation rec {
name = " v a l a - ${ version } " ;
version = " ${ major } . ${ minor } " ;
p name = " v a l a " ;
inherit version ;
setupHook = substituteAll {
src = ./setup-hook.sh ;
apiVersion = major ;
apiVersion = lib . versions . majorMinor version ;
} ;
src = fetchurl {
url = " m i r r o r : / / g n o m e / s o u r c e s / v a l a / ${ major } / ${ name } . t a r . x z " ;
url = " m i r r o r : / / g n o m e / s o u r c e s / ${ pname } / ${ lib . versions . majorMinor version } / ${ p name} - ${ version } . t a r . x z " ;
inherit sha256 ;
} ;
@ -78,19 +76,27 @@ let
nativeBuildInputs = [
pkgconfig flex bison libxslt
] ++ lib . optional ( stdenv . isDarwin && ( a tLeast " 0 . 3 8 " ) ) expat
] ++ lib . optional ( stdenv . isDarwin && ( lib . versionA tLeast version " 0 . 3 8 " ) ) expat
++ lib . optional disableGraphviz autoreconfHook # if we changed our ./configure script, need to reconfigure
++ extraNativeBuildInputs ;
buildInputs = [
glib libiconv libintl
] ++ lib . optional ( a tLeast " 0 . 3 8 " && withGraphviz ) graphviz
] ++ lib . optional ( lib . versionA tLeast version " 0 . 3 8 " && withGraphviz ) graphviz
++ extraBuildInputs ;
enableParallelBuilding = true ;
doCheck = false ; # fails, requires dbus daemon
# Wait for PR #59372
#passthru = {
# updateScript = gnome3.updateScript {
# attrPath = "${pname}_${lib.versions.major version}_${lib.versions.minor version}";
# packageName = pname;
# };
#};
meta = with stdenv . lib ; {
description = " C o m p i l e r f o r G O b j e c t t y p e s y s t e m " ;
homepage = https://wiki.gnome.org/Projects/Vala ;
@ -102,33 +108,28 @@ let
in rec {
vala_0_36 = generic {
major = " 0 . 3 6 " ;
minor = " 1 9 " ;
version = " 0 . 3 6 . 1 9 " ;
sha256 = " 0 5 s i 2 f 4 z j v q 0 q 3 w q f h 1 w x d q 2 0 j y 1 x q x q 2 s k q h 8 v f h 2 j y p 3 5 5 l w a r " ;
} ;
vala_0_38 = generic {
major = " 0 . 3 8 " ;
minor = " 1 0 " ;
sha256 = " 1 r d w w q s 9 7 3 q v 2 2 5 v 8 b 5 i z c g w v q n 5 6 j x g r 4 p a 3 w x x b l i a r 3 a w w 5 s w " ;
version = " 0 . 3 8 . 1 0 " ;
sha256 = " 1 r d w w q s 9 7 3 q v 2 2 5 v 8 b 5 i z c g w v q n 5 6 j x g r 4 p a 3 w x x b l i a r 3 a w w 5 s w " ;
extraNativeBuildInputs = [ autoconf ] ++ lib . optional stdenv . isDarwin libtool ;
} ;
vala_0_40 = generic {
major = " 0 . 4 0 " ;
minor = " 1 5 " ;
version = " 0 . 4 0 . 1 5 " ;
sha256 = " 0 m f a y l i 1 5 9 y y w 6 a b j f 6 s g q 4 1 j 5 4 m r 3 n s p g 2 5 b 1 k x h y p c z 0 s c j m 1 9 " ;
} ;
vala_0_42 = generic {
major = " 0 . 4 2 " ;
minor = " 7 " ;
version = " 0 . 4 2 . 7 " ;
sha256 = " 0 2 9 k s b s d p l 5 8 1 w z y 5 7 0 k j 4 k k w 8 b 4 b i z g h 4 9 4 c 0 5 1 z s v k w c k 5 5 p 8 3 " ;
} ;
vala_0_44 = generic {
major = " 0 . 4 4 " ;
minor = " 3 " ;
version = " 0 . 4 4 . 3 " ;
sha256 = " 1 s g a s 7 z 6 y 9 r 2 m f 4 p x r y 3 f x 2 a w d n z n 3 v l g 2 s x d 3 h q p y 2 a 9 0 i b 8 l w 5 " ;
} ;