2018-08-08 19:28:43 +01:00
|
|
|
{ stdenv, lib, fetchurl, pkgconfig, flex, bison, libxslt, autoconf, automake, graphviz
|
2018-03-14 19:15:06 +00:00
|
|
|
, glib, libiconv, libintl, libtool, expat
|
2016-10-12 12:51:54 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2017-10-03 01:21:00 +01:00
|
|
|
generic = { major, minor, sha256, extraNativeBuildInputs ? [], extraBuildInputs ? [] }:
|
2018-05-21 10:13:14 +01:00
|
|
|
let
|
|
|
|
atLeast = lib.versionAtLeast "${major}.${minor}";
|
|
|
|
in stdenv.mkDerivation rec {
|
2018-08-08 19:28:43 +01:00
|
|
|
name = "vala-${version}";
|
|
|
|
version = "${major}.${minor}";
|
2016-10-12 12:51:54 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://gnome/sources/vala/${major}/${name}.tar.xz";
|
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
2018-08-08 19:28:43 +01:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs tests
|
|
|
|
'';
|
|
|
|
|
2017-11-24 01:14:13 +00:00
|
|
|
outputs = [ "out" "devdoc" ];
|
|
|
|
|
2018-05-21 10:13:14 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkgconfig flex bison libxslt
|
|
|
|
] ++ lib.optional (stdenv.isDarwin && (atLeast "0.38")) expat
|
|
|
|
++ extraNativeBuildInputs;
|
2016-10-12 12:51:54 +01:00
|
|
|
|
2018-05-21 10:13:14 +01:00
|
|
|
buildInputs = [
|
|
|
|
glib libiconv libintl
|
|
|
|
] ++ lib.optional (atLeast "0.38") graphviz
|
|
|
|
++ extraBuildInputs;
|
2016-10-12 12:51:54 +01:00
|
|
|
|
2018-09-04 21:48:01 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2018-08-08 19:28:43 +01:00
|
|
|
doCheck = false; # fails, requires dbus daemon
|
|
|
|
|
2016-10-12 12:51:54 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Compiler for GObject type system";
|
2018-03-07 04:47:38 +00:00
|
|
|
homepage = https://wiki.gnome.org/Projects/Vala;
|
2016-10-12 12:51:54 +01:00
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
platforms = platforms.unix;
|
2018-03-07 04:47:38 +00:00
|
|
|
maintainers = with maintainers; [ antono jtojnar lethalman peterhoeg ];
|
2016-10-12 12:51:54 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
in rec {
|
|
|
|
vala_0_34 = generic {
|
|
|
|
major = "0.34";
|
2018-08-29 10:01:10 +01:00
|
|
|
minor = "18";
|
|
|
|
sha256 = "1lhw3ghns059y5d6pdldy5p4yjwlhcls84k892i6qmbhxg34945q";
|
2017-12-18 07:27:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
vala_0_36 = generic {
|
|
|
|
major = "0.36";
|
2018-12-22 22:35:21 +00:00
|
|
|
minor = "17";
|
|
|
|
sha256 = "1f6qg40zd6jzhbwr3dy4fb66k4qs1xlk2whdyqh64zxxjw0k9pv7";
|
2016-10-12 12:51:54 +01:00
|
|
|
};
|
|
|
|
|
2017-10-03 01:21:00 +01:00
|
|
|
vala_0_38 = generic {
|
|
|
|
major = "0.38";
|
2018-08-29 10:01:53 +01:00
|
|
|
minor = "10";
|
|
|
|
sha256 = "1rdwwqs973qv225v8b5izcgwvqn56jxgr4pa3wxxbliar3aww5sw";
|
2018-05-21 10:13:14 +01:00
|
|
|
extraNativeBuildInputs = [ autoconf ] ++ lib.optional stdenv.isDarwin libtool;
|
2017-10-03 01:21:00 +01:00
|
|
|
};
|
|
|
|
|
2018-03-13 02:30:15 +00:00
|
|
|
vala_0_40 = generic {
|
|
|
|
major = "0.40";
|
2018-12-22 22:35:54 +00:00
|
|
|
minor = "12";
|
|
|
|
sha256 = "1nhk45w5iwg97q3cfybn0i4qz5w9qvk423ndpg6mq6cnna076snx";
|
2018-03-13 02:30:15 +00:00
|
|
|
};
|
|
|
|
|
2018-09-04 14:18:43 +01:00
|
|
|
vala_0_42 = generic {
|
|
|
|
major = "0.42";
|
|
|
|
minor = "3";
|
|
|
|
sha256 = "0zaq9009wqk5aah131m426a2ia0scwpjpl4npf8p7p43wv8kvisz";
|
|
|
|
};
|
|
|
|
|
|
|
|
vala = vala_0_42;
|
2016-10-12 12:51:54 +01:00
|
|
|
}
|