depot/third_party/nixpkgs/pkgs/by-name/sw/swig/package.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

53 lines
1.2 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
autoconf,
automake,
libtool,
bison,
pcre2,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "swig";
version = "4.2.1";
src = fetchFromGitHub {
owner = "swig";
repo = "swig";
rev = "v${finalAttrs.version}";
hash = "sha256-VlUsiRZLScmbC7hZDzKqUr9481YXVwo0eXT/jy6Fda8=";
};
PCRE_CONFIG = "${pcre2.dev}/bin/pcre-config";
nativeBuildInputs = [
autoconf
automake
libtool
bison
];
buildInputs = [ pcre2 ];
configureFlags = [ "--without-tcl" ];
# Disable ccache documentation as it needs yodl
postPatch = ''
sed -i '/man1/d' CCache/Makefile.in
'';
preConfigure = ''
./autogen.sh
'';
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";
homepage = "https://swig.org/";
# 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;
};
})