about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/misc/swig/2.x.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/misc/swig/2.x.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/misc/swig/2.x.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/misc/swig/2.x.nix b/nixpkgs/pkgs/development/tools/misc/swig/2.x.nix
new file mode 100644
index 000000000000..1068b3e2ad9d
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/misc/swig/2.x.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, bison, pcre }:
+
+stdenv.mkDerivation rec {
+  pname = "swig";
+  version = "2.0.12";
+
+  src = fetchFromGitHub {
+    owner = "swig";
+    repo = "swig";
+    rev = "rel-${version}";
+    sha256 = "0khm9gh5pczfcihr0pbicaicc4v9kjm5ip2alvkhmbb3ga6njkcm";
+  };
+
+  nativeBuildInputs = [ autoconf automake libtool bison ];
+  buildInputs = [ pcre ];
+
+  configureFlags = [ "--without-tcl" ];
+
+  # Disable ccache documentation as it needs yodl
+  postPatch = ''
+    sed -i '/man1/d' CCache/Makefile.in
+  '';
+
+  preConfigure = ''
+    ./autogen.sh
+  '';
+
+  meta = with lib; {
+    description = "SWIG, an interface compiler that connects C/C++ code to higher-level languages";
+    homepage = "http://swig.org/";
+    # Different types of licenses available: http://www.swig.org/Release/LICENSE .
+    license = licenses.gpl3Plus;
+    platforms = with platforms; linux ++ darwin;
+  };
+}