llvmPackages_{14,15,16,17}.lldb: use SWIG 4; swig3: drop (#341384)

This commit is contained in:
Emily 2024-09-12 22:34:47 +01:00 committed by GitHub
commit ccd4aee4ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
22 changed files with 107 additions and 87 deletions

View File

@ -39,7 +39,7 @@
, pcre2
, libdeflate
, swig4
, swig
, python
, wxPython
, opencascade-occt_7_6
@ -168,7 +168,7 @@ stdenv.mkDerivation rec {
curl
openssl
boost
swig4
swig
python
unixODBC
libdeflate

View File

@ -8,7 +8,7 @@
, flex
, git
, python3
, swig4
, swig
, boost179
, cbc # for clp
, cimg
@ -51,7 +51,7 @@ mkDerivation rec {
flex
git
pkg-config
swig4
swig
];
buildInputs = [

View File

@ -29,7 +29,7 @@
, wrapGAppsHook3
, scriptingSupport ? true
, luajit
, swig4
, swig
, python3
, alsaSupport ? stdenv.isLinux
, alsa-lib
@ -94,7 +94,7 @@ stdenv.mkDerivation (finalAttrs: {
wrapGAppsHook3
wrapQtAppsHook
]
++ optional scriptingSupport swig4;
++ optional scriptingSupport swig;
buildInputs = [
curl

View File

@ -11,7 +11,7 @@
elfutils,
enablePython ? false,
pythonPackages ? null,
swig4,
swig,
}:
stdenv.mkDerivation (finalAttrs: {
@ -34,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: {
pkg-config
]
++ lib.optionals enablePython [
swig4
swig
pythonPackages.setuptools
];
buildInputs = [

View File

@ -30,7 +30,7 @@
#sundials,
superscs,
spral,
swig4,
swig,
tinyxml-2,
withUnfree ? false,
}:
@ -139,7 +139,7 @@ stdenv.mkDerivation (finalAttrs: {
#sundials
superscs
spral
swig4
swig
tinyxml-2
]
++ lib.optionals withUnfree [

View File

@ -1,4 +1,13 @@
{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, bison, pcre2 }:
{
lib,
stdenv,
fetchFromGitHub,
autoconf,
automake,
libtool,
bison,
pcre2,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "swig";
@ -12,7 +21,12 @@ stdenv.mkDerivation (finalAttrs: {
};
PCRE_CONFIG = "${pcre2.dev}/bin/pcre-config";
nativeBuildInputs = [ autoconf automake libtool bison ];
nativeBuildInputs = [
autoconf
automake
libtool
bison
];
buildInputs = [ pcre2 ];
configureFlags = [ "--without-tcl" ];

View File

@ -4,7 +4,7 @@
fetchFromGitHub,
}:
## for updating to swig4, see
## for updating to SWIG 4, see
## https://github.com/GeraldWodni/swig/pull/6
(swig.overrideAttrs (old: {
version = "3.0.9-forth";

View File

@ -10,6 +10,7 @@
substituteAll,
fetchFromGitHub,
fetchpatch,
fetchpatch2,
overrideCC,
wrapCCWith,
wrapBintoolsWith,
@ -606,9 +607,35 @@ let
(_: _: { name = "resource-dir.patch"; })
) { };
in
lib.optional (lib.versionOlder metadata.release_version "16")
lib.optionals (lib.versionOlder metadata.release_version "15") [
# Fixes for SWIG 4
(fetchpatch2 {
url = "https://github.com/llvm/llvm-project/commit/81fc5f7909a4ef5a8d4b5da2a10f77f7cb01ba63.patch?full_index=1";
stripLen = 1;
hash = "sha256-Znw+C0uEw7lGETQLKPBZV/Ymo2UigZS+Hv/j1mUo7p0=";
})
(fetchpatch2 {
url = "https://github.com/llvm/llvm-project/commit/f0a25fe0b746f56295d5c02116ba28d2f965c175.patch?full_index=1";
stripLen = 1;
hash = "sha256-QzVeZzmc99xIMiO7n//b+RNAvmxghISKQD93U2zOgFI=";
})
]
++ lib.optionals (lib.versionOlder metadata.release_version "16") [
# Fixes for SWIG 4
(fetchpatch2 {
url = "https://github.com/llvm/llvm-project/commit/ba35c27ec9aa9807f5b4be2a0c33ca9b045accc7.patch?full_index=1";
stripLen = 1;
hash = "sha256-LXl+WbpmWZww5xMDrle3BM2Tw56v8k9LO1f1Z1/wDTs=";
})
(fetchpatch2 {
url = "https://github.com/llvm/llvm-project/commit/9ec115978ea2bdfc60800cd3c21264341cdc8b0a.patch?full_index=1";
stripLen = 1;
hash = "sha256-u0zSejEjfrH3ZoMFm1j+NVv2t5AP9cE5yhsrdTS1dG4=";
})
# FIXME: do we need this after 15?
(metadata.getVersionFile "lldb/procfs.patch")
]
++ lib.optional (lib.versionOlder metadata.release_version "17") resourceDirPatch
++ lib.optional (lib.versionOlder metadata.release_version "14") (
metadata.getVersionFile "lldb/gnu-install-dirs.patch"

View File

@ -5,8 +5,7 @@
, cmake
, zlib
, ncurses
, swig3
, swig4
, swig
, which
, libedit
, libxml2
@ -42,7 +41,6 @@ let
name = if lib.versionAtLeast release_version "18" then "lldb-dap" else "lldb-vscode";
version = if lib.versionAtLeast release_version "18" then "0.2.0" else "0.1.0";
};
swig = if lib.versionAtLeast release_version "18" then swig4 else swig3;
in
stdenv.mkDerivation (rec {
@ -186,10 +184,7 @@ stdenv.mkDerivation (rec {
larger LLVM Project, such as the Clang expression parser and LLVM
disassembler.
'';
# llvm <10 never built on aarch64-darwin since first introduction in nixpkgs
broken =
(lib.versionOlder release_version "11" && stdenv.isDarwin && stdenv.isAarch64)
|| (((lib.versions.major release_version) == "13") && stdenv.isDarwin);
broken = lib.versionOlder release_version "14";
mainProgram = "lldb";
};
} // lib.optionalAttrs enableManpages {

View File

@ -13,6 +13,7 @@
, python3Packages
, git
, fetchpatch
, fetchpatch2
, makeWrapper
, gnumake
, file
@ -302,6 +303,32 @@ in stdenv.mkDerivation {
patch -p1 -d llvm-project/llvm -i ${./patches/llvm-module-cache.patch}
for lldbPatch in ${lib.escapeShellArgs [
# Fixes for SWIG 4
(fetchpatch2 {
url = "https://github.com/llvm/llvm-project/commit/81fc5f7909a4ef5a8d4b5da2a10f77f7cb01ba63.patch?full_index=1";
stripLen = 1;
hash = "sha256-Znw+C0uEw7lGETQLKPBZV/Ymo2UigZS+Hv/j1mUo7p0=";
})
(fetchpatch2 {
url = "https://github.com/llvm/llvm-project/commit/f0a25fe0b746f56295d5c02116ba28d2f965c175.patch?full_index=1";
stripLen = 1;
hash = "sha256-QzVeZzmc99xIMiO7n//b+RNAvmxghISKQD93U2zOgFI=";
})
(fetchpatch2 {
url = "https://github.com/llvm/llvm-project/commit/ba35c27ec9aa9807f5b4be2a0c33ca9b045accc7.patch?full_index=1";
stripLen = 1;
hash = "sha256-LXl+WbpmWZww5xMDrle3BM2Tw56v8k9LO1f1Z1/wDTs=";
})
(fetchpatch2 {
url = "https://github.com/llvm/llvm-project/commit/9ec115978ea2bdfc60800cd3c21264341cdc8b0a.patch?full_index=1";
stripLen = 1;
hash = "sha256-u0zSejEjfrH3ZoMFm1j+NVv2t5AP9cE5yhsrdTS1dG4=";
})
]}; do
patch -p1 -d llvm-project/lldb -i $lldbPatch
done
patch -p1 -d llvm-project/clang -i ${./patches/clang-toolchain-dir.patch}
patch -p1 -d llvm-project/clang -i ${./patches/clang-wrap.patch}
patch -p1 -d llvm-project/clang -i ${../../llvm/12/clang/purity.patch}
@ -365,7 +392,7 @@ in stdenv.mkDerivation {
'';
# > clang-15-unwrapped: error: unsupported option '-fzero-call-used-regs=used-gpr' for target 'arm64-apple-macosx10.9.0'
hardeningDisable = lib.optional stdenv.isDarwin "zerocallusedregs";
hardeningDisable = lib.optional stdenv.isAarch64 "zerocallusedregs";
configurePhase = ''
export SWIFT_SOURCE_ROOT="$PWD"

View File

@ -10,7 +10,7 @@
, libiconv
, enablePython ? false
, python ? null
, swig4
, swig
, expat
, libuuid
, openjpeg
@ -64,7 +64,7 @@ stdenv.mkDerivation rec {
ApplicationServices
Cocoa
libiconv
] ++ lib.optionals enablePython [ swig4 python ];
] ++ lib.optionals enablePython [ swig python ];
disabledTests = [
# require networking:

View File

@ -15,7 +15,7 @@
buildPackages,
qtbase ? null,
pythonSupport ? false,
swig4 ? null,
swig ? null,
# only for passthru.tests
libsForQt5,
qt6Packages,
@ -70,7 +70,7 @@ stdenv.mkDerivation rec {
python3.pkgs.setuptools
python3.pkgs.wheel
ncurses
swig4
swig
which
];

View File

@ -14,7 +14,7 @@
, python
, re2
, stdenv
, swig4
, swig
, unzip
, zlib
}:
@ -75,7 +75,7 @@ stdenv.mkDerivation rec {
ensureNewerSourcesForZipFilesHook
pkg-config
python.pythonOnBuildForHost
swig4
swig
unzip
] ++ lib.optionals stdenv.isDarwin [
DarwinTools

View File

@ -2,7 +2,7 @@
, stdenv
, fetchFromGitHub
, cmake
, swig4
, swig
, lua
, elastix
, itk
@ -21,7 +21,7 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [
cmake
swig4
swig
];
buildInputs = [
elastix

View File

@ -2,7 +2,7 @@
toPythonModule,
python,
lttng-tools,
swig4,
swig,
}:
toPythonModule (
@ -15,7 +15,7 @@ toPythonModule (
{
pname = "lttng";
nativeBuildInputs = nativeBuildInputs ++ [ swig4 ];
nativeBuildInputs = nativeBuildInputs ++ [ swig ];
configureFlags = configureFlags ++ [
"--enable-python-bindings"

View File

@ -4,7 +4,7 @@
callPackage,
fetchPypi,
setuptools,
swig4,
swig,
}:
buildPythonPackage rec {
@ -19,7 +19,7 @@ buildPythonPackage rec {
build-system = [ setuptools ];
nativeBuildInputs = [ swig4 ];
nativeBuildInputs = [ swig ];
pypaBuildFlags = [ "--skip-dependency-check" ];

View File

@ -15,7 +15,7 @@
libXmu,
opencascade-occt,
rapidjson,
swig4,
swig,
}:
stdenv.mkDerivation rec {
@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
cmake
swig4
swig
];
buildInputs = [
python

View File

@ -2,7 +2,7 @@
buildPythonPackage,
pythonOlder,
cmake,
swig4,
swig,
elastix,
itk,
numpy,
@ -27,7 +27,7 @@ buildPythonPackage rec {
nativeBuildInputs = [
cmake
swig4
swig
scikit-build
];
propagatedBuildInputs = [

View File

@ -1,36 +0,0 @@
{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, bison, pcre }:
stdenv.mkDerivation rec {
pname = "swig";
version = "3.0.12";
src = fetchFromGitHub {
owner = "swig";
repo = "swig";
rev = "rel-${version}";
sha256 = "1wyffskbkzj5zyhjnnpip80xzsjcr3p0q5486z3wdwabnysnhn8n";
};
PCRE_CONFIG = "${pcre.dev}/bin/pcre-config";
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 = "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;
platforms = with platforms; linux ++ darwin;
};
}

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, boost, libseccomp, flex, swig4, bison, cmake, python3 }:
{ lib, stdenv, fetchFromGitHub, boost, libseccomp, flex, swig, bison, cmake, python3 }:
stdenv.mkDerivation rec {
pname = "grap";
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
cmake
flex
python3
swig4
swig
];
buildInputs = [

View File

@ -1482,6 +1482,9 @@ mapAliases ({
swift-im = throw "swift-im has been removed as it is unmaintained and depends on deprecated Python 2 / Qt WebKit"; # Added 2023-01-06
swig1 = throw "swig1 has been removed as it is obsolete"; # Added 2024-08-23
swig2 = throw "swig2 has been removed as it is obsolete"; # Added 2024-08-23
swig3 = throw "swig3 has been removed as it is obsolete"; # Added 2024-09-12
swig4 = swig; # Added 2024-09-12
swigWithJava = throw "swigWithJava has been removed as the main swig package has supported Java since 2009"; # Added 2024-09-12
swtpm-tpm2 = swtpm; # Added 2021-02-26
Sylk = sylk; # Added 2024-06-12
symbiyosys = sby; # Added 2024-08-18

View File

@ -18955,11 +18955,6 @@ with pkgs;
systemfd = callPackage ../development/tools/systemfd { };
swig3 = callPackage ../development/tools/misc/swig/3.x.nix { };
swig4 = callPackage ../development/tools/misc/swig/4.nix { };
swig = swig4;
swigWithJava = swig;
c2ffi = callPackage ../development/tools/misc/c2ffi { };
c0 = callPackage ../development/compilers/c0 {
@ -32027,9 +32022,7 @@ with pkgs;
open-policy-agent = callPackage ../development/tools/open-policy-agent { };
openmm = callPackage ../development/libraries/science/chemistry/openmm {
swig = swig4;
};
openmm = callPackage ../development/libraries/science/chemistry/openmm { };
openshift = callPackage ../applications/networking/cluster/openshift { };
@ -37630,9 +37623,6 @@ with pkgs;
faiss = callPackage ../development/libraries/science/math/faiss {
pythonPackages = python3Packages;
# faiss wants the "-doxygen" option
# available only since swig4
swig = swig4;
};
faissWithCuda = faiss.override {