1{ stdenv
2, lib
3, fetchurl
4, cmake
5, qtbase
6, wrapQtAppsHook
7}:
8
9let
10 isQt6 = lib.versions.major qtbase.version == "6";
11 cmakeName = if isQt6 then "KDSoap-qt6" else "KDSoap";
12in stdenv.mkDerivation rec {
13 pname = "kdsoap";
14 version = "2.2.0";
15
16 src = fetchurl {
17 url = "https://github.com/KDAB/KDSoap/releases/download/kdsoap-${version}/kdsoap-${version}.tar.gz";
18 sha256 = "sha256-2e8RlIRCGXyfpEvW+63IQrcoCmDfxAV3r2b97WN681Y=";
19 };
20
21 outputs = [ "out" "dev" ];
22
23 nativeBuildInputs = [ cmake wrapQtAppsHook ];
24
25 buildInputs = [ qtbase ];
26
27 cmakeFlags = [ (lib.cmakeBool "KDSoap_QT6" isQt6) ];
28
29 postInstall = ''
30 moveToOutput bin/kdwsdl2cpp* "$dev"
31 substituteInPlace "$out/lib/cmake/${cmakeName}/KDSoapTargets-release.cmake" \
32 --replace $out/bin $dev/bin
33 '';
34
35 meta = with lib; {
36 description = "A Qt-based client-side and server-side SOAP component";
37 longDescription = ''
38 KD Soap is a Qt-based client-side and server-side SOAP component.
39
40 It can be used to create client applications for web services and also
41 provides the means to create web services without the need for any further
42 component such as a dedicated web server.
43 '';
44 license = with licenses; [ gpl2 gpl3 lgpl21 ];
45 maintainers = [ maintainers.ttuegel ];
46 };
47}