streamlink: 7.1.1 -> 7.1.2 (#373269)
[NixPkgs.git] / pkgs / by-name / sw / swiften / package.nix
blob754ac1b8c79f1cc322dab908a98536d6f8cb1e66
2   stdenv,
3   lib,
4   libidn,
5   lua,
6   miniupnpc,
7   expat,
8   zlib,
9   fetchurl,
10   fetchpatch,
11   openssl,
12   boost,
13   scons,
16 stdenv.mkDerivation rec {
17   pname = "swiften";
18   version = "4.0.3";
20   src = fetchurl {
21     url = "http://swift.im/git/swift/snapshot/swift-${version}.tar.bz2";
22     hash = "sha256-aj+T6AevtR8birbsj+83nfzFC6cf72q+7nwSM0jaZrA=";
23   };
25   patches = [
26     ./scons.patch
27     ./build-fix.patch
29     # Fix build with latest boost
30     # https://swift.im/git/swift/commit/Swiften/Base/Platform.h?id=3666cbbe30e4d4e25401a5902ae359bc2c24248b
31     (fetchpatch {
32       name = "3666cbbe30e4d4e25401a5902ae359bc2c24248b.patch";
33       url = "https://swift.im/git/swift/patch/Swiften/Base/Platform.h?id=3666cbbe30e4d4e25401a5902ae359bc2c24248b";
34       sha256 = "Wh8Nnfm0/EppSJ7aH2vTNObHtodE5tM19kV1oDfm70w=";
35     })
36   ];
38   nativeBuildInputs = [
39     scons
40   ];
42   buildInputs = [
43     libidn
44     lua
45     miniupnpc
46     expat
47     zlib
48   ];
50   propagatedBuildInputs = [
51     openssl
52     boost
53   ];
55   sconsFlags = [
56     "openssl=${openssl.dev}"
57     "boost_includedir=${boost.dev}/include"
58     "boost_libdir=${boost.out}/lib"
59     "boost_bundled_enable=false"
60     "max_jobs=1"
61     "optimize=1"
62     "debug=0"
63     "swiften_dll=1"
64   ];
66   postPatch = ''
67     # Ensure bundled dependencies cannot be used.
68     rm -rf 3rdParty
70     find . \( \
71       -name '*.py' -o -name SConscript -o -name SConstruct \
72       \) -exec 2to3 -w {} +
73   '';
75   installTargets = "${placeholder "out"}";
77   installFlags = [
78     "SWIFTEN_INSTALLDIR=${placeholder "out"}"
79   ];
81   enableParallelBuilding = true;
83   meta = with lib; {
84     description = "XMPP library for C++, used by the Swift client";
85     mainProgram = "swiften-config";
86     homepage = "http://swift.im/swiften.html";
87     license = licenses.gpl2Plus;
88     platforms = platforms.linux;
89     maintainers = [ maintainers.twey ];
90   };