diff --git a/pkgs/applications/radio/soapysdr/default.nix b/pkgs/applications/radio/soapysdr/default.nix index ee03d67d5986..43e110b1ae3f 100644 --- a/pkgs/applications/radio/soapysdr/default.nix +++ b/pkgs/applications/radio/soapysdr/default.nix @@ -1,18 +1,19 @@ -{ stdenv -, lib -, fetchFromGitHub -, fetchpatch -, cmake -, pkg-config -, makeWrapper -, libusb-compat-0_1 -, ncurses -, usePython ? false -, python ? null -, swig2 -, extraPackages ? [ ] -, buildPackages -, testers +{ + stdenv, + lib, + fetchFromGitHub, + fetchpatch, + cmake, + pkg-config, + makeWrapper, + libusb-compat-0_1, + ncurses, + usePython ? false, + python ? null, + swig3, + extraPackages ? [ ], + buildPackages, + testers, }: stdenv.mkDerivation (finalAttrs: { @@ -39,21 +40,19 @@ stdenv.mkDerivation (finalAttrs: { pkg-config makeWrapper ]; - buildInputs = [ - libusb-compat-0_1 - ncurses - ] ++ lib.optionals usePython [ - python - swig2 - ]; + buildInputs = + [ + libusb-compat-0_1 + ncurses + ] + ++ lib.optionals usePython [ + python + swig3 + ]; - propagatedBuildInputs = lib.optionals usePython [ - python.pkgs.numpy - ]; + propagatedBuildInputs = lib.optionals usePython [ python.pkgs.numpy ]; - cmakeFlags = lib.optionals usePython [ - "-DUSE_PYTHON_CONFIG=ON" - ]; + cmakeFlags = lib.optionals usePython [ "-DUSE_PYTHON_CONFIG=ON" ]; postFixup = lib.optionalString (extraPackages != [ ]) ( # Join all plugins via symlinking @@ -62,12 +61,11 @@ stdenv.mkDerivation (finalAttrs: { ${buildPackages.xorg.lndir}/bin/lndir -silent ${pkg} $out '')) lib.concatStrings - ] + '' + ] + + '' # Needed for at least the remote plugin server for file in $out/bin/*; do - wrapProgram "$file" --prefix SOAPY_SDR_PLUGIN_PATH : ${lib.escapeShellArg ( - lib.makeSearchPath finalAttrs.passthru.searchPath extraPackages - )} + wrapProgram "$file" --prefix SOAPY_SDR_PLUGIN_PATH : ${lib.escapeShellArg (lib.makeSearchPath finalAttrs.passthru.searchPath extraPackages)} done '' ); diff --git a/pkgs/by-name/ba/babeltrace/package.nix b/pkgs/by-name/ba/babeltrace/package.nix index 488f81ffec2a..4d651d5e700e 100644 --- a/pkgs/by-name/ba/babeltrace/package.nix +++ b/pkgs/by-name/ba/babeltrace/package.nix @@ -11,7 +11,7 @@ elfutils, enablePython ? false, pythonPackages ? null, - swig2, + swig4, }: stdenv.mkDerivation (finalAttrs: { @@ -34,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: { pkg-config ] ++ lib.optionals enablePython [ - swig2 + swig4 pythonPackages.setuptools ]; buildInputs = [ diff --git a/pkgs/development/libraries/gpgme/default.nix b/pkgs/development/libraries/gpgme/default.nix index 395ccfde0632..d6c2a10edb8c 100644 --- a/pkgs/development/libraries/gpgme/default.nix +++ b/pkgs/development/libraries/gpgme/default.nix @@ -1,24 +1,25 @@ -{ lib -, stdenv -, fetchurl -, autoreconfHook -, libgpg-error -, gnupg -, pkg-config -, glib -, pth -, libassuan -, which -, ncurses -, texinfo -, buildPackages -, qtbase ? null -, pythonSupport ? false -, swig2 ? null -# only for passthru.tests -, libsForQt5 -, qt6Packages -, python3 +{ + lib, + stdenv, + fetchurl, + autoreconfHook, + libgpg-error, + gnupg, + pkg-config, + glib, + pth, + libassuan, + which, + ncurses, + texinfo, + buildPackages, + qtbase ? null, + pythonSupport ? false, + swig4 ? null, + # only for passthru.tests + libsForQt5, + qt6Packages, + python3, }: stdenv.mkDerivation rec { @@ -26,7 +27,11 @@ stdenv.mkDerivation rec { version = "1.23.2"; pyproject = true; - outputs = [ "out" "dev" "info" ]; + outputs = [ + "out" + "dev" + "info" + ]; outputBin = "dev"; # gpgme-config; not so sure about gpgme-tool @@ -52,54 +57,50 @@ stdenv.mkDerivation rec { --replace-fail 'tmp="-unknown"' 'tmp=""' ''; - nativeBuildInputs = [ - autoreconfHook - gnupg - pkg-config - texinfo - ] ++ lib.optionals pythonSupport [ - python3.pythonOnBuildForHost - python3.pkgs.pip - python3.pkgs.setuptools - python3.pkgs.wheel - ncurses - swig2 - which - ]; + nativeBuildInputs = + [ + autoreconfHook + gnupg + pkg-config + texinfo + ] + ++ lib.optionals pythonSupport [ + python3.pythonOnBuildForHost + python3.pkgs.pip + python3.pkgs.setuptools + python3.pkgs.wheel + ncurses + swig4 + which + ]; - buildInputs = lib.optionals pythonSupport [ - python3 - ]; + buildInputs = lib.optionals pythonSupport [ python3 ]; propagatedBuildInputs = [ glib libassuan libgpg-error pth - ] ++ lib.optionals (qtbase != null) [ - qtbase - ]; + ] ++ lib.optionals (qtbase != null) [ qtbase ]; - nativeCheckInputs = [ - which - ]; + nativeCheckInputs = [ which ]; - depsBuildBuild = [ - buildPackages.stdenv.cc - ]; + depsBuildBuild = [ buildPackages.stdenv.cc ]; dontWrapQtApps = true; - configureFlags = [ - "--enable-fixed-path=${gnupg}/bin" - "--with-libgpg-error-prefix=${libgpg-error.dev}" - "--with-libassuan-prefix=${libassuan.dev}" - ] ++ lib.optional pythonSupport "--enable-languages=python" - # Tests will try to communicate with gpg-agent instance via a UNIX socket - # which has a path length limit. Nix on darwin is using a build directory - # that already has quite a long path and the resulting socket path doesn't - # fit in the limit. https://github.com/NixOS/nix/pull/1085 - ++ lib.optionals stdenv.isDarwin [ "--disable-gpg-test" ]; + configureFlags = + [ + "--enable-fixed-path=${gnupg}/bin" + "--with-libgpg-error-prefix=${libgpg-error.dev}" + "--with-libassuan-prefix=${libassuan.dev}" + ] + ++ lib.optional pythonSupport "--enable-languages=python" + # Tests will try to communicate with gpg-agent instance via a UNIX socket + # which has a path length limit. Nix on darwin is using a build directory + # that already has quite a long path and the resulting socket path doesn't + # fit in the limit. https://github.com/NixOS/nix/pull/1085 + ++ lib.optionals stdenv.isDarwin [ "--disable-gpg-test" ]; env.NIX_CFLAGS_COMPILE = toString ( # qgpgme uses Q_ASSERT which retains build inputs at runtime unless @@ -116,7 +117,10 @@ stdenv.mkDerivation rec { doCheck = true; - checkFlags = [ "-C" "tests" ]; + checkFlags = [ + "-C" + "tests" + ]; passthru.tests = { python = python3.pkgs.gpgme; @@ -134,7 +138,10 @@ stdenv.mkDerivation rec { encryption, decryption, signing, signature verification and key management. ''; - license = with licenses; [ lgpl21Plus gpl3Plus ]; + license = with licenses; [ + lgpl21Plus + gpl3Plus + ]; platforms = platforms.unix; maintainers = with maintainers; [ dotlambda ]; }; diff --git a/pkgs/development/python-modules/lttng/default.nix b/pkgs/development/python-modules/lttng/default.nix index 2c41fa2c35ec..735eb4408a32 100644 --- a/pkgs/development/python-modules/lttng/default.nix +++ b/pkgs/development/python-modules/lttng/default.nix @@ -2,7 +2,7 @@ toPythonModule, python, lttng-tools, - swig2, + swig4, }: toPythonModule ( @@ -15,7 +15,7 @@ toPythonModule ( { pname = "lttng"; - nativeBuildInputs = nativeBuildInputs ++ [ swig2 ]; + nativeBuildInputs = nativeBuildInputs ++ [ swig4 ]; configureFlags = configureFlags ++ [ "--enable-python-bindings" diff --git a/pkgs/development/tools/misc/swig/2.x.nix b/pkgs/development/tools/misc/swig/2.x.nix deleted file mode 100644 index fd8e2a368417..000000000000 --- a/pkgs/development/tools/misc/swig/2.x.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, bison, pcre }: - -stdenv.mkDerivation rec { - pname = "swig"; - version = "2.0.12"; - - src = fetchFromGitHub { - owner = "swig"; - repo = "swig"; - rev = "rel-${version}"; - sha256 = "0khm9gh5pczfcihr0pbicaicc4v9kjm5ip2alvkhmbb3ga6njkcm"; - }; - - # pcre-config isn't on PATH when cross-building - 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 = "SWIG, an 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; - }; -} diff --git a/pkgs/development/tools/misc/swig/default.nix b/pkgs/development/tools/misc/swig/default.nix deleted file mode 100644 index ad7b64c25568..000000000000 --- a/pkgs/development/tools/misc/swig/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ lib, stdenv, fetchurl, boost, tcl }: - -stdenv.mkDerivation rec { - pname = "swig"; - version = "1.3.40"; - - src = fetchurl { - url = "mirror://sourceforge/swig/${pname}-${version}.tar.gz"; - sha256 = "02dc8g8wy75nd2is1974rl24c6mdl0ai1vszs1xpg9nd7dlv6i8r"; - }; - - doCheck = !stdenv.isCygwin; - # 'make check' uses boost and tcl - buildInputs = lib.optionals doCheck [ boost tcl ]; - - configureFlags = [ "--disable-ccache" ]; - - - meta = with lib; { - description = "SWIG, an interface compiler that connects C/C++ code to higher-level languages"; - mainProgram = "swig"; - homepage = "https://swig.org/"; - # Different types of licenses available: http://www.swig.org/Release/LICENSE . - license = licenses.gpl3Plus; - platforms = with platforms; linux ++ darwin; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 16c45774b0e2..f24da4867e2a 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1452,6 +1452,8 @@ mapAliases ({ sumneko-lua-language-server = lua-language-server; # Added 2023-02-07 supertux-editor = throw "'supertux-editor' has been removed, as it was broken and unmaintained"; # Added 2023-12-22 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 swtpm-tpm2 = swtpm; # Added 2021-02-26 Sylk = sylk; # Added 2024-06-12 symbiyosys = sby; # Added 2024-08-18 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 48668cc069c9..b05d99c0808e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19016,8 +19016,6 @@ with pkgs; systemfd = callPackage ../development/tools/systemfd { }; - swig1 = callPackage ../development/tools/misc/swig { }; - swig2 = callPackage ../development/tools/misc/swig/2.x.nix { }; swig3 = callPackage ../development/tools/misc/swig/3.x.nix { }; swig4 = callPackage ../development/tools/misc/swig/4.nix { }; swig = swig3;