about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/swiften
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-02-22 10:43:06 +0000
committerAlyssa Ross <hi@alyssa.is>2022-03-11 16:17:56 +0000
commitca1aada113c0ebda1ab8667199f6453f8e01c4fc (patch)
tree55e402280096f62eb0bc8bcad5ce6050c5a0aec7 /nixpkgs/pkgs/development/libraries/swiften
parente4df5a52a6a6531f32626f57205356a773ac2975 (diff)
parent93883402a445ad467320925a0a5dbe43a949f25b (diff)
downloadnixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar
nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.gz
nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.bz2
nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.lz
nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.xz
nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.zst
nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.zip
Merge commit '93883402a445ad467320925a0a5dbe43a949f25b'
Conflicts:
	nixpkgs/nixos/modules/programs/ssh.nix
	nixpkgs/pkgs/applications/networking/browsers/firefox/packages.nix
	nixpkgs/pkgs/data/fonts/noto-fonts/default.nix
	nixpkgs/pkgs/development/go-modules/generic/default.nix
	nixpkgs/pkgs/development/interpreters/ruby/default.nix
	nixpkgs/pkgs/development/libraries/mesa/default.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/swiften')
-rw-r--r--nixpkgs/pkgs/development/libraries/swiften/build-fix.patch10
-rw-r--r--nixpkgs/pkgs/development/libraries/swiften/default.nix72
2 files changed, 69 insertions, 13 deletions
diff --git a/nixpkgs/pkgs/development/libraries/swiften/build-fix.patch b/nixpkgs/pkgs/development/libraries/swiften/build-fix.patch
index 01814cadfbd4..d0ce099973c2 100644
--- a/nixpkgs/pkgs/development/libraries/swiften/build-fix.patch
+++ b/nixpkgs/pkgs/development/libraries/swiften/build-fix.patch
@@ -30,3 +30,13 @@ diff -wbBur swift-4.0.2/Swiften/Network/PlatformNATTraversalWorker.cpp swift-4.0
      if (natPMPSupported) {
          return natPMPInterface;
      }
+--- a/Swift/Controllers/ShowProfileController.h
++++ b/Swift/Controllers/ShowProfileController.h
+@@ -12,6 +12,7 @@
+ 
+ #pragma once
+ 
++#include <map>
+ #include <Swiften/Elements/ErrorPayload.h>
+ #include <Swiften/Elements/VCard.h>
+ #include <Swiften/JID/JID.h>
diff --git a/nixpkgs/pkgs/development/libraries/swiften/default.nix b/nixpkgs/pkgs/development/libraries/swiften/default.nix
index 980d034682f5..ef30c5916eab 100644
--- a/nixpkgs/pkgs/development/libraries/swiften/default.nix
+++ b/nixpkgs/pkgs/development/libraries/swiften/default.nix
@@ -1,18 +1,57 @@
-{ lib, stdenv, python, fetchurl, openssl, boost, sconsPackages }:
+{ stdenv
+, lib
+, python2
+, libidn
+, lua
+, miniupnpc
+, expat
+, zlib
+, fetchurl
+, fetchpatch
+, openssl
+, boost
+, sconsPackages
+}:
+
 stdenv.mkDerivation rec {
   pname = "swiften";
   version = "4.0.2";
 
-  nativeBuildInputs = [ sconsPackages.scons_3_1_2 ];
-  buildInputs           = [ python ];
-  propagatedBuildInputs = [ openssl boost ];
-
   src = fetchurl {
-    url    = "https://swift.im/downloads/releases/swift-${version}/swift-${version}.tar.gz";
+    url = "https://swift.im/downloads/releases/swift-${version}/swift-${version}.tar.gz";
     sha256 = "0w0aiszjd58ynxpacwcgf052zpmbpcym4dhci64vbfgch6wryz0w";
   };
 
-  patches = [ ./scons.patch ./build-fix.patch ];
+  patches = [
+    ./scons.patch
+    ./build-fix.patch
+
+    # Fix build with latest boost
+    # https://swift.im/git/swift/commit/Swiften/Base/Platform.h?id=3666cbbe30e4d4e25401a5902ae359bc2c24248b
+    (fetchpatch {
+      name = "3666cbbe30e4d4e25401a5902ae359bc2c24248b.patch";
+      url = "https://swift.im/git/swift/patch/Swiften/Base/Platform.h?id=3666cbbe30e4d4e25401a5902ae359bc2c24248b";
+      sha256 = "Wh8Nnfm0/EppSJ7aH2vTNObHtodE5tM19kV1oDfm70w=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    sconsPackages.scons_3_1_2
+  ];
+
+  buildInputs = [
+    python2
+    libidn
+    lua
+    miniupnpc
+    expat
+    zlib
+  ];
+
+  propagatedBuildInputs = [
+    openssl
+    boost
+  ];
 
   sconsFlags = [
     "openssl=${openssl.dev}"
@@ -24,18 +63,25 @@ stdenv.mkDerivation rec {
     "debug=0"
     "swiften_dll=1"
   ];
-  preInstall = ''
-    installTargets="$out"
-    installFlags+=" SWIFTEN_INSTALLDIR=$out"
+
+  postPatch = ''
+    # Ensure bundled dependencies cannot be used.
+    rm -rf 3rdParty
   '';
 
+  installTargets = "${placeholder "out"}";
+
+  installFlags = [
+    "SWIFTEN_INSTALLDIR=${placeholder "out"}"
+  ];
+
   enableParallelBuilding = true;
 
   meta = with lib; {
     description = "An XMPP library for C++, used by the Swift client";
-    homepage    = "http://swift.im/swiften.html";
-    license     = licenses.gpl2Plus;
-    platforms   = platforms.linux;
+    homepage = "http://swift.im/swiften.html";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
     maintainers = [ maintainers.twey ];
   };
 }