Files
nixpkgs/pkgs/by-name/sw/swiften/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

97 lines
2.0 KiB
Nix

{
stdenv,
lib,
libidn,
lua,
miniupnpc,
expat,
zlib,
fetchurl,
fetchpatch,
python312,
openssl,
# pin Boost 1.86 due to use of boost/asio/io_service.hpp
boost186,
scons,
}:
stdenv.mkDerivation rec {
pname = "swiften";
version = "4.0.3";
src = fetchurl {
url = "http://swift.im/git/swift/snapshot/swift-${version}.tar.bz2";
hash = "sha256-aj+T6AevtR8birbsj+83nfzFC6cf72q+7nwSM0jaZrA=";
};
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=";
})
./gcc14-fix.patch
];
nativeBuildInputs = [
python312 # 2to3
scons
];
buildInputs = [
libidn
lua
miniupnpc
expat
zlib
];
propagatedBuildInputs = [
openssl
boost186
];
sconsFlags = [
"openssl=${openssl.dev}"
"boost_includedir=${lib.getDev boost186}/include"
"boost_libdir=${boost186.out}/lib"
"boost_bundled_enable=false"
"max_jobs=1"
"optimize=1"
"debug=0"
"swiften_dll=1"
];
postPatch = ''
# Ensure bundled dependencies cannot be used.
rm -rf 3rdParty
find . \( \
-name '*.py' -o -name SConscript -o -name SConstruct \
\) -exec 2to3 -w {} +
'';
installTargets = "${placeholder "out"}";
installFlags = [
"SWIFTEN_INSTALLDIR=${placeholder "out"}"
];
enableParallelBuilding = true;
meta = with lib; {
description = "XMPP library for C++, used by the Swift client";
mainProgram = "swiften-config";
homepage = "http://swift.im/swiften.html";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = [ maintainers.twey ];
};
}