summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorPeter Hoeg <peter@speartail.com>2016-10-12 19:51:54 +0800
committerPeter Hoeg <peter@speartail.com>2016-10-12 21:12:05 +0800
commita6d1d06a95bc1073b9966fbfb7829938c1d403e6 (patch)
treef6a6a759687149ca6028dfe7b93fd96d8716aa76 /pkgs/development/compilers
parentadfcc2d9531e78bf6a9e3b56e2f4fc873cb3d87b (diff)
downloadnixpkgs-a6d1d06a95bc1073b9966fbfb7829938c1d403e6.tar
nixpkgs-a6d1d06a95bc1073b9966fbfb7829938c1d403e6.tar.gz
nixpkgs-a6d1d06a95bc1073b9966fbfb7829938c1d403e6.tar.bz2
nixpkgs-a6d1d06a95bc1073b9966fbfb7829938c1d403e6.tar.lz
nixpkgs-a6d1d06a95bc1073b9966fbfb7829938c1d403e6.tar.xz
nixpkgs-a6d1d06a95bc1073b9966fbfb7829938c1d403e6.tar.zst
nixpkgs-a6d1d06a95bc1073b9966fbfb7829938c1d403e6.zip
vala: unify builders for various versions
We are currently carrying a number of vala versions where each version
is essentially just a copy of the earlier version.

This PR gets rid of a ton of duplication and uses a standard builder.

Secondly, we add a definition for the latest vala 0.34.1.

Lastly, we add a generic "vala" that refers to the latest stable
version.

I have tried changing the definitions for "simple-scan" and "valum" to use
the latest vala version and they at least compile OK so I'll try a
massive sed job to replace all the definitions later to simply use the
latest version through "vala" instead of specifying a version directly.

According to upstream:

"Well-maintained packages are expected to always build with the latest
stable Vala version."

Maybe this means that my generic builder is then no longer necessary. Oh well...

I added myself to the maintainer array for vala although I have no
interest in the language - this was purely a nix exercise for me but I
thought it was reasonable to be the one to clean up the mess if this has
side effects...

Cc: @antono and @lethalman
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/vala/0.23.nix30
-rw-r--r--pkgs/development/compilers/vala/0.26.nix30
-rw-r--r--pkgs/development/compilers/vala/0.28.nix30
-rw-r--r--pkgs/development/compilers/vala/0.32.nix31
-rw-r--r--pkgs/development/compilers/vala/default.nix61
5 files changed, 61 insertions, 121 deletions
diff --git a/pkgs/development/compilers/vala/0.23.nix b/pkgs/development/compilers/vala/0.23.nix
deleted file mode 100644
index 13b9c5f3983..00000000000
--- a/pkgs/development/compilers/vala/0.23.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, flex, bison, libxslt
-, glib, libiconv, libintlOrEmpty
-}:
-
-let
-  major = "0.23";
-  minor = "2";
-  sha256 = "0g22ss9qbm3fqhx4fxhsyfmdc5g1hgdw4dz9d37f4489kl0qf8pl";
-in
-stdenv.mkDerivation rec {
-  name = "vala-${major}.${minor}";
-
-  meta = {
-    description = "Compiler for GObject type system";
-    homepage = "http://live.gnome.org/Vala";
-    license = stdenv.lib.licenses.lgpl21Plus;
-    platforms = stdenv.lib.platforms.unix;
-    maintainers = with stdenv.lib.maintainers; [ antono ];
-  };
-
-  src = fetchurl {
-    url = "mirror://gnome/sources/vala/${major}/${name}.tar.xz";
-    inherit sha256;
-  };
-
-  nativeBuildInputs = [ pkgconfig flex bison libxslt ];
-
-  buildInputs = [ glib libiconv ]
-    ++ libintlOrEmpty;
-}
diff --git a/pkgs/development/compilers/vala/0.26.nix b/pkgs/development/compilers/vala/0.26.nix
deleted file mode 100644
index 78cb850c356..00000000000
--- a/pkgs/development/compilers/vala/0.26.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, flex, bison, libxslt
-, glib, libiconv, libintlOrEmpty
-}:
-
-let
-  major = "0.26";
-  minor = "2";
-  sha256 = "37f13f430c56a93b6dac85239084681fd8f31c407d386809c43bc2f2836e03c4";
-in
-stdenv.mkDerivation rec {
-  name = "vala-${major}.${minor}";
-
-  meta = {
-    description = "Compiler for GObject type system";
-    homepage = "http://live.gnome.org/Vala";
-    license = stdenv.lib.licenses.lgpl21Plus;
-    platforms = stdenv.lib.platforms.unix;
-    maintainers = with stdenv.lib.maintainers; [ antono lethalman ];
-  };
-
-  src = fetchurl {
-    url = "mirror://gnome/sources/vala/${major}/${name}.tar.xz";
-    inherit sha256;
-  };
-
-  nativeBuildInputs = [ pkgconfig flex bison libxslt ];
-
-  buildInputs = [ glib libiconv ]
-    ++ libintlOrEmpty;
-}
diff --git a/pkgs/development/compilers/vala/0.28.nix b/pkgs/development/compilers/vala/0.28.nix
deleted file mode 100644
index caec4fda887..00000000000
--- a/pkgs/development/compilers/vala/0.28.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, flex, bison, libxslt
-, glib, libiconv, libintlOrEmpty
-}:
-
-let
-  major = "0.28";
-  minor = "0";
-  sha256 = "0zwpzhkhfk3piya14m7p2hl2vaabahprphppfm46ci91z39kp7hd";
-in
-stdenv.mkDerivation rec {
-  name = "vala-${major}.${minor}";
-
-  meta = {
-    description = "Compiler for GObject type system";
-    homepage = "http://live.gnome.org/Vala";
-    license = stdenv.lib.licenses.lgpl21Plus;
-    platforms = stdenv.lib.platforms.unix;
-    maintainers = with stdenv.lib.maintainers; [ antono lethalman ];
-  };
-
-  src = fetchurl {
-    url = "mirror://gnome/sources/vala/${major}/${name}.tar.xz";
-    inherit sha256;
-  };
-
-  nativeBuildInputs = [ pkgconfig flex bison libxslt ];
-
-  buildInputs = [ glib libiconv ]
-    ++ libintlOrEmpty;
-}
diff --git a/pkgs/development/compilers/vala/0.32.nix b/pkgs/development/compilers/vala/0.32.nix
deleted file mode 100644
index 202b9fff6c8..00000000000
--- a/pkgs/development/compilers/vala/0.32.nix
+++ /dev/null
@@ -1,31 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, flex, bison, libxslt
-, glib, libiconv, libintlOrEmpty
-}:
-
-let
-  major = "0.32";
-  minor = "1";
-  sha256 = "1ab1l44abf9fj1wznzq5956431ia136rl5049cggnk5393jlf3fx";
-in
-stdenv.mkDerivation rec {
-  name = "vala-${major}.${minor}";
-
-  meta = {
-    description = "Compiler for GObject type system";
-    homepage = "http://live.gnome.org/Vala";
-    license = stdenv.lib.licenses.lgpl21Plus;
-    platforms = stdenv.lib.platforms.unix;
-    maintainers = with stdenv.lib.maintainers; [ antono lethalman ];
-  };
-
-  src = fetchurl {
-    url = "mirror://gnome/sources/vala/${major}/${name}.tar.xz";
-    inherit sha256;
-  };
-
-  nativeBuildInputs = [ pkgconfig flex bison libxslt ];
-
-  buildInputs = [ glib libiconv ]
-    ++ libintlOrEmpty;
-
-}
diff --git a/pkgs/development/compilers/vala/default.nix b/pkgs/development/compilers/vala/default.nix
new file mode 100644
index 00000000000..b0153a75403
--- /dev/null
+++ b/pkgs/development/compilers/vala/default.nix
@@ -0,0 +1,61 @@
+{ stdenv, fetchurl, pkgconfig, flex, bison, libxslt
+, glib, libiconv, libintlOrEmpty
+}:
+
+let
+  generic = { major, minor, sha256 }:
+  stdenv.mkDerivation rec {
+    name = "vala-${major}.${minor}";
+
+    src = fetchurl {
+      url = "mirror://gnome/sources/vala/${major}/${name}.tar.xz";
+      inherit sha256;
+    };
+
+    nativeBuildInputs = [ pkgconfig flex bison libxslt ];
+
+    buildInputs = [ glib libiconv ] ++ libintlOrEmpty;
+
+    meta = with stdenv.lib; {
+      description = "Compiler for GObject type system";
+      homepage = "http://live.gnome.org/Vala";
+      license = licenses.lgpl21Plus;
+      platforms = platforms.unix;
+      maintainers = with maintainers; [ antono lethalman peterhoeg ];
+    };
+  };
+
+in rec {
+
+  vala_0_23 = generic {
+    major   = "0.23";
+    minor   = "2";
+    sha256  = "0g22ss9qbm3fqhx4fxhsyfmdc5g1hgdw4dz9d37f4489kl0qf8pl";
+  };
+
+  vala_0_26 = generic {
+    major   = "0.26";
+    minor   = "2";
+    sha256  = "1i03ds1z5hivqh4nhf3x80fg7n0zd22908w5minkpaan1i1kzw9p";
+  };
+
+  vala_0_28 = generic {
+    major   = "0.28";
+    minor   = "0";
+    sha256  = "0zwpzhkhfk3piya14m7p2hl2vaabahprphppfm46ci91z39kp7hd";
+  };
+
+  vala_0_32 = generic {
+    major   = "0.32";
+    minor   = "1";
+    sha256  = "1ab1l44abf9fj1wznzq5956431ia136rl5049cggnk5393jlf3fx";
+  };
+
+  vala_0_34 = generic {
+    major   = "0.34";
+    minor   = "1";
+    sha256  = "16cjybjw100qps6jg0jdyjh8hndz8a876zmxpybnf30a8vygrk7m";
+  };
+
+  vala = vala_0_34;
+}