forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / development / libraries / kdsoap / default.nix
blob2cb371588b8708d82cac65d64b3d4ff46f93e576
1 { stdenv
2 , lib
3 , fetchurl
4 , cmake
5 , qtbase
6 , wrapQtAppsHook
7 }:
9 let
10   isQt6 = lib.versions.major qtbase.version == "6";
11   cmakeName = if isQt6 then "KDSoap-qt6" else "KDSoap";
12 in stdenv.mkDerivation rec {
13   pname = "kdsoap";
14   version = "2.2.0";
16   src = fetchurl {
17     url = "https://github.com/KDAB/KDSoap/releases/download/kdsoap-${version}/kdsoap-${version}.tar.gz";
18     sha256 = "sha256-2e8RlIRCGXyfpEvW+63IQrcoCmDfxAV3r2b97WN681Y=";
19   };
21   outputs = [ "out" "dev" ];
23   nativeBuildInputs = [ cmake wrapQtAppsHook ];
25   buildInputs = [ qtbase ];
27   cmakeFlags = [ (lib.cmakeBool "KDSoap_QT6" isQt6) ];
29   postInstall = ''
30     moveToOutput bin/kdwsdl2cpp* "$dev"
31     substituteInPlace "$out/lib/cmake/${cmakeName}/KDSoapTargets-release.cmake" \
32       --replace $out/bin $dev/bin
33   '';
35   meta = with lib; {
36     description = "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.
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   };