Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swig4: 4.0.2 -> 4.2.1 #277049

Merged
merged 2 commits into from
Jul 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions pkgs/development/libraries/science/math/faiss/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@ stdenv.mkDerivation {
})
];

postPatch = ''
# Remove the following substituteInPlace when updating
# to a release that contains change from PR
# https://github.com/facebookresearch/faiss/issues/3239
# that fixes building faiss with swig 4.2.x
substituteInPlace faiss/python/swigfaiss.swig \
--replace-fail '#ifdef SWIGWORDSIZE64' '#if (__SIZEOF_LONG__ == 8)'
'';

buildInputs = [
blas
swig
Expand Down
30 changes: 16 additions & 14 deletions pkgs/development/tools/misc/swig/4.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, bison, pcre }:
{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, bison, pcre2 }:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "swig";
version = "4.0.2";
version = "4.2.1";

src = fetchFromGitHub {
owner = "swig";
repo = "swig";
rev = "rel-${version}";
sha256 = "12vlps766xvwck8q0i280s8yx21qm2dxl34710ybpmz3c1cfdjsc";
rev = "v${finalAttrs.version}";
hash = "sha256-VlUsiRZLScmbC7hZDzKqUr9481YXVwo0eXT/jy6Fda8=";
};

PCRE_CONFIG = "${pcre.dev}/bin/pcre-config";
PCRE_CONFIG = "${pcre2.dev}/bin/pcre-config";
nativeBuildInputs = [ autoconf automake libtool bison ];
buildInputs = [ pcre ];
buildInputs = [ pcre2 ];

configureFlags = [ "--without-tcl" ];

Expand All @@ -26,12 +26,14 @@ stdenv.mkDerivation rec {
./autogen.sh
'';

meta = with lib; {
description = "SWIG, an interface compiler that connects C/C++ code to higher-level languages";
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: http://www.swig.org/Release/LICENSE .
license = licenses.gpl3Plus;
maintainers = with maintainers; [ orivej ];
platforms = with platforms; linux ++ darwin;
# 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;
};
}
})