@@ -0,0 +1,37 @@
1+{ stdenv, fetchFromGitHub, autoconf, automake, libtool, bison, pcre }:
2+
3+stdenv.mkDerivation rec {
4+ pname = "swig";
5+ version = "4.0.0";
6+
7+ src = fetchFromGitHub {
8+ owner = "swig";
9+ repo = "swig";
10+ rev = "rel-${version}";
11+ sha256 = "0yx33972jd3214xr3mrap0j5clma9bvs42qz8x38dfz62xlsi78v";
12+ };
13+
14+ PCRE_CONFIG = "${pcre.dev}/bin/pcre-config";
15+ nativeBuildInputs = [ autoconf automake libtool bison ];
16+ buildInputs = [ pcre ];
17+
18+ configureFlags = [ "--without-tcl" ];
19+
20+ # Disable ccache documentation as it needs yodl
21+ postPatch = ''
22+ sed -i '/man1/d' CCache/Makefile.in
23+ '';
24+
25+ preConfigure = ''
26+ ./autogen.sh
27+ '';
28+
29+ meta = with stdenv.lib; {
30+ description = "SWIG, an interface compiler that connects C/C++ code to higher-level languages";
31+ homepage = http://swig.org/;
32+ # Different types of licenses available: http://www.swig.org/Release/LICENSE .
33+ license = licenses.gpl3Plus;
34+ maintainers = with maintainers; [ orivej ];
35+ platforms = with platforms; linux ++ darwin;
36+ };
37+}