nixpkgs/pkgs/development/libraries/swiften/default.nix

88 lines
1.7 KiB
Nix
Raw Normal View History

2022-01-08 14:10:27 +00:00
{ stdenv
, lib
, python2
2022-01-08 14:32:30 +00:00
, libidn
, lua
, miniupnpc
2022-01-08 14:10:27 +00:00
, expat
2022-01-08 14:32:30 +00:00
, zlib
2022-01-08 14:10:27 +00:00
, fetchurl
, fetchpatch
, openssl
, boost
, sconsPackages
}:
2015-10-08 21:24:04 +00:00
stdenv.mkDerivation rec {
pname = "swiften";
2018-06-19 16:47:00 +00:00
version = "4.0.2";
2015-10-08 21:24:04 +00:00
src = fetchurl {
2022-01-08 14:13:29 +00:00
url = "https://swift.im/downloads/releases/swift-${version}/swift-${version}.tar.gz";
2018-06-19 16:47:00 +00:00
sha256 = "0w0aiszjd58ynxpacwcgf052zpmbpcym4dhci64vbfgch6wryz0w";
2015-10-08 21:24:04 +00:00
};
2022-01-08 14:10:27 +00:00
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=";
})
];
2022-01-08 14:13:29 +00:00
nativeBuildInputs = [
sconsPackages.scons_3_1_2
];
buildInputs = [
python2
2022-01-08 14:32:30 +00:00
libidn
lua
miniupnpc
2022-01-08 14:13:29 +00:00
expat
2022-01-08 14:32:30 +00:00
zlib
2022-01-08 14:13:29 +00:00
];
propagatedBuildInputs = [
openssl
boost
];
sconsFlags = [
"openssl=${openssl.dev}"
"boost_includedir=${boost.dev}/include"
"boost_libdir=${boost.out}/lib"
"boost_bundled_enable=false"
"max_jobs=1"
"optimize=1"
"debug=0"
"swiften_dll=1"
];
2022-01-08 14:13:29 +00:00
2022-01-08 14:32:30 +00:00
postPatch = ''
# Ensure bundled dependencies cannot be used.
rm -rf 3rdParty
'';
2022-01-08 14:13:29 +00:00
installTargets = "${placeholder "out"}";
installFlags = [
"SWIFTEN_INSTALLDIR=${placeholder "out"}"
];
2015-10-08 21:24:04 +00:00
enableParallelBuilding = true;
meta = with lib; {
2015-10-08 21:24:04 +00:00
description = "An XMPP library for C++, used by the Swift client";
2022-01-08 14:13:29 +00:00
homepage = "http://swift.im/swiften.html";
license = licenses.gpl2Plus;
platforms = platforms.linux;
2015-10-08 21:24:04 +00:00
maintainers = [ maintainers.twey ];
};
}