2024-09-19 14:19:46 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
autoconf,
|
|
|
|
automake,
|
|
|
|
libtool,
|
|
|
|
bison,
|
|
|
|
pcre2,
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "swig";
|
2024-07-31 10:19:44 +00:00
|
|
|
version = "4.2.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "swig";
|
|
|
|
repo = "swig";
|
2024-07-31 10:19:44 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
|
|
|
hash = "sha256-VlUsiRZLScmbC7hZDzKqUr9481YXVwo0eXT/jy6Fda8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
PCRE_CONFIG = "${pcre2.dev}/bin/pcre-config";
|
2024-09-19 14:19:46 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoconf
|
|
|
|
automake
|
|
|
|
libtool
|
|
|
|
bison
|
|
|
|
];
|
2024-07-31 10:19:44 +00:00
|
|
|
buildInputs = [ pcre2 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags = [ "--without-tcl" ];
|
|
|
|
|
|
|
|
# Disable ccache documentation as it needs yodl
|
|
|
|
postPatch = ''
|
|
|
|
sed -i '/man1/d' CCache/Makefile.in
|
|
|
|
'';
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
./autogen.sh
|
|
|
|
'';
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
meta = {
|
|
|
|
changelog = "https://github.com/swig/swig/blob/${finalAttrs.src.rev}/CHANGES.current";
|
|
|
|
description = "Interface compiler that connects C/C++ code to higher-level languages";
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://swig.org/";
|
2024-07-31 10:19:44 +00:00
|
|
|
# Different types of licenses available: https://www.swig.org/Release/LICENSE .
|
|
|
|
license = lib.licenses.gpl3Plus;
|
|
|
|
maintainers = with lib.maintainers; [ orivej ];
|
|
|
|
mainProgram = "swig";
|
|
|
|
platforms = with lib.platforms; linux ++ darwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2024-07-31 10:19:44 +00:00
|
|
|
})
|