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

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

Merged
merged 9 commits into from
Sep 12, 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
4 changes: 2 additions & 2 deletions pkgs/applications/science/electronics/kicad/base.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
, pcre2
, libdeflate

, swig4
, swig
, python
, wxPython
, opencascade-occt_7_6
Expand Down Expand Up @@ -168,7 +168,7 @@ stdenv.mkDerivation rec {
curl
openssl
boost
swig4
swig
python
unixODBC
libdeflate
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/science/electronics/openroad/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
, flex
, git
, python3
, swig4
, swig
, boost179
, cbc # for clp
, cimg
Expand Down Expand Up @@ -51,7 +51,7 @@ mkDerivation rec {
flex
git
pkg-config
swig4
swig
];

buildInputs = [
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/video/obs-studio/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
, wrapGAppsHook3
, scriptingSupport ? true
, luajit
, swig4
, swig
, python3
, alsaSupport ? stdenv.isLinux
, alsa-lib
Expand Down Expand Up @@ -94,7 +94,7 @@ stdenv.mkDerivation (finalAttrs: {
wrapGAppsHook3
wrapQtAppsHook
]
++ optional scriptingSupport swig4;
++ optional scriptingSupport swig;

buildInputs = [
curl
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/ba/babeltrace/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
elfutils,
enablePython ? false,
pythonPackages ? null,
swig4,
swig,
}:

stdenv.mkDerivation (finalAttrs: {
Expand All @@ -34,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: {
pkg-config
]
++ lib.optionals enablePython [
swig4
swig
pythonPackages.setuptools
];
buildInputs = [
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/ca/casadi/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#sundials,
superscs,
spral,
swig4,
swig,
tinyxml-2,
withUnfree ? false,
}:
Expand Down Expand Up @@ -139,7 +139,7 @@ stdenv.mkDerivation (finalAttrs: {
#sundials
superscs
spral
swig4
swig
tinyxml-2
]
++ lib.optionals withUnfree [
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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" ];
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/gforth/swig.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
29 changes: 28 additions & 1 deletion pkgs/development/compilers/llvm/common/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
substituteAll,
fetchFromGitHub,
fetchpatch,
fetchpatch2,
overrideCC,
wrapCCWith,
wrapBintoolsWith,
Expand Down Expand Up @@ -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"
Expand Down
9 changes: 2 additions & 7 deletions pkgs/development/compilers/llvm/common/lldb.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
, cmake
, zlib
, ncurses
, swig3
, swig4
, swig
, which
, libedit
, libxml2
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
29 changes: 28 additions & 1 deletion pkgs/development/compilers/swift/compiler/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
, python3Packages
, git
, fetchpatch
, fetchpatch2
, makeWrapper
, gnumake
, file
Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/libraries/gdcm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
, libiconv
, enablePython ? false
, python ? null
, swig4
, swig
, expat
, libuuid
, openjpeg
Expand Down Expand Up @@ -64,7 +64,7 @@ stdenv.mkDerivation rec {
ApplicationServices
Cocoa
libiconv
] ++ lib.optionals enablePython [ swig4 python ];
] ++ lib.optionals enablePython [ swig python ];

disabledTests = [
# require networking:
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/libraries/gpgme/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
buildPackages,
qtbase ? null,
pythonSupport ? false,
swig4 ? null,
swig ? null,
# only for passthru.tests
libsForQt5,
qt6Packages,
Expand Down Expand Up @@ -70,7 +70,7 @@ stdenv.mkDerivation rec {
python3.pkgs.setuptools
python3.pkgs.wheel
ncurses
swig4
swig
which
];

Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/libraries/science/math/or-tools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
, python
, re2
, stdenv
, swig4
, swig
, unzip
, zlib
}:
Expand Down Expand Up @@ -75,7 +75,7 @@ stdenv.mkDerivation rec {
ensureNewerSourcesForZipFilesHook
pkg-config
python.pythonOnBuildForHost
swig4
swig
unzip
] ++ lib.optionals stdenv.isDarwin [
DarwinTools
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/libraries/simpleitk/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
, stdenv
, fetchFromGitHub
, cmake
, swig4
, swig
, lua
, elastix
, itk
Expand All @@ -21,7 +21,7 @@ stdenv.mkDerivation (finalAttrs: {

nativeBuildInputs = [
cmake
swig4
swig
];
buildInputs = [
elastix
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/lttng/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
toPythonModule,
python,
lttng-tools,
swig4,
swig,
}:

toPythonModule (
Expand All @@ -15,7 +15,7 @@ toPythonModule (
{
pname = "lttng";

nativeBuildInputs = nativeBuildInputs ++ [ swig4 ];
nativeBuildInputs = nativeBuildInputs ++ [ swig ];

configureFlags = configureFlags ++ [
"--enable-python-bindings"
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/pykcs11/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
callPackage,
fetchPypi,
setuptools,
swig4,
swig,
}:

buildPythonPackage rec {
Expand All @@ -19,7 +19,7 @@ buildPythonPackage rec {

build-system = [ setuptools ];

nativeBuildInputs = [ swig4 ];
nativeBuildInputs = [ swig ];

pypaBuildFlags = [ "--skip-dependency-check" ];

Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/pythonocc-core/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
libXmu,
opencascade-occt,
rapidjson,
swig4,
swig,
}:

stdenv.mkDerivation rec {
Expand All @@ -37,7 +37,7 @@ stdenv.mkDerivation rec {

nativeBuildInputs = [
cmake
swig4
swig
];
buildInputs = [
python
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/simpleitk/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
buildPythonPackage,
pythonOlder,
cmake,
swig4,
swig,
elastix,
itk,
numpy,
Expand All @@ -27,7 +27,7 @@ buildPythonPackage rec {

nativeBuildInputs = [
cmake
swig4
swig
scikit-build
];
propagatedBuildInputs = [
Expand Down
Loading