nixpkgs/pkgs/development/compilers/vala/default.nix

73 lines
1.9 KiB
Nix
Raw Normal View History

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