Unverified Commit e02a25dd authored by Emily's avatar Emily Committed by GitHub
Browse files

swig1, swig2: remove (#336845)

parents 5ab8ad93 46eee3f7
Loading
Loading
Loading
Loading
+30 −32
Original line number Diff line number Diff line
{ 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 = [
  buildInputs =
    [
      libusb-compat-0_1
      ncurses
  ] ++ lib.optionals usePython [
    ]
    ++ lib.optionals usePython [
      python
    swig2
      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
    ''
  );
+2 −2
Original line number Diff line number Diff line
@@ -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 = [
+68 −61
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchurl
, autoreconfHook
, libgpg-error
, gnupg
, pkg-config
, glib
, pth
, libassuan
, which
, ncurses
, texinfo
, buildPackages
, qtbase ? null
, pythonSupport ? false
, swig2 ? null
{
  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
  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,49 +57,45 @@ stdenv.mkDerivation rec {
      --replace-fail 'tmp="-unknown"' 'tmp=""'
  '';

  nativeBuildInputs = [
  nativeBuildInputs =
    [
      autoreconfHook
      gnupg
      pkg-config
      texinfo
  ] ++ lib.optionals pythonSupport [
    ]
    ++ lib.optionals pythonSupport [
      python3.pythonOnBuildForHost
      python3.pkgs.pip
      python3.pkgs.setuptools
      python3.pkgs.wheel
      ncurses
    swig2
      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 = [
  configureFlags =
    [
      "--enable-fixed-path=${gnupg}/bin"
      "--with-libgpg-error-prefix=${libgpg-error.dev}"
      "--with-libassuan-prefix=${libassuan.dev}"
  ] ++ lib.optional pythonSupport "--enable-languages=python"
    ]
    ++ 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
@@ -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 ];
  };
+2 −2
Original line number Diff line number Diff line
@@ -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"
+0 −37
Original line number Diff line number Diff line
{ 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;
  };
}
Loading