librewolf: 132.0.1 -> 132.0.1-1 (#355483)
[NixPkgs.git] / pkgs / by-name / db / dbus_cplusplus / package.nix
blob95dbdce239c798c7a923577fb8b8794718f571b1
1 { lib, stdenv, fetchurl, fetchpatch, dbus, glib, pkg-config, expat }:
3 stdenv.mkDerivation rec {
4   pname = "dbus-cplusplus";
5   version = "0.9.0";
7   src = fetchurl {
8     url = "mirror://sourceforge/dbus-cplusplus/dbus-c%2B%2B/0.9.0/libdbus-c%2B%2B-0.9.0.tar.gz";
9     name = "${pname}-${version}.tar.gz";
10     sha256 = "0qafmy2i6dzx4n1dqp6pygyy6gjljnb7hwjcj2z11c1wgclsq4dw";
11   };
13   patches = [
14     (fetchurl {
15       name = "gcc-4.7.patch";
16       url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/"
17           + "dbus-c++/files/dbus-c++-0.9.0-gcc-4.7.patch";
18       sha256 = "0rwcz9pvc13b3yfr0lkifnfz0vb5q6dg240bzgf37ni4s8rpc72g";
19     })
20     (fetchpatch {
21       name = "writechar.patch"; # since gcc7
22       url = "https://src.fedoraproject.org/rpms/dbus-c++/raw/9f515ace0594c8b2b9f0d41ffe71bc5b78d30eee/f/dbus-c++-writechar.patch";
23       sha256 = "1kkg4gbpm4hp87l25zw2a3r9c58g7vvgzcqgiman734i66zsbb9l";
24     })
25     (fetchpatch {
26       name = "threading.patch"; # since gcc7
27       url = "https://src.fedoraproject.org/rpms/dbus-c++/raw/9f515ace0594c8b2b9f0d41ffe71bc5b78d30eee/f/dbus-c++-threading.patch";
28       sha256 = "1h362anx3wyxm5lq0v8girmip1jmkdbijrmbrq7k5pp47zkhwwrq";
29     })
30     (fetchpatch {
31       name = "template-operators.patch"; # since gcc12
32       url = "https://src.fedoraproject.org/rpms/dbus-c++/raw/9f515ace0594c8b2b9f0d41ffe71bc5b78d30eee/f/dbus-c++-template-operators.patch";
33       hash = "sha256-B8S7z/YH2YEQgaRsBJBBVTx8vHQhHW7z171TZmogpL8=";
34     })
35     (fetchpatch {
36       name = "0001-src-eventloop.cpp-use-portable-method-for-initializi.patch";
37       url = "https://github.com/openembedded/meta-openembedded/raw/119e75e48dbf0539b4e440417901458ffff79b38/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0001-src-eventloop.cpp-use-portable-method-for-initializi.patch";
38       hash = "sha256-GJWvp5F26c88OCGLrFcXaqUl2FMSDCluppMrRQO3rzc=";
39     })
40     (fetchpatch {
41       name = "0002-tools-generate_proxy.cpp-avoid-possibly-undefined-ui.patch";
42       url = "https://github.com/openembedded/meta-openembedded/raw/119e75e48dbf0539b4e440417901458ffff79b38/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0002-tools-generate_proxy.cpp-avoid-possibly-undefined-ui.patch";
43       hash = "sha256-P9JuG/6k5L6NTiAGH9JRfNcwpNVOV29RQC6fTj0fKZE=";
44     })
45     (fetchpatch {
46       name = "0003-Fixed-undefined-ssize_t-for-clang-3.8.0-on-FreeBSD.patch";
47       url = "https://github.com/openembedded/meta-openembedded/raw/119e75e48dbf0539b4e440417901458ffff79b38/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0003-Fixed-undefined-ssize_t-for-clang-3.8.0-on-FreeBSD.patch";
48       hash = "sha256-/RCpDvaLIw0kmuBvUGbfnVEvgTKjIQWcSKWheCfgSmM=";
49     })
50   ];
52   nativeBuildInputs = [ pkg-config ];
53   buildInputs = [ dbus glib expat ];
55   configureFlags = [
56     "--disable-ecore"
57     "--disable-tests"
58   ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
59     "--disable-examples"
60   ];
62   meta = with lib; {
63     homepage = "https://dbus-cplusplus.sourceforge.net";
64     description = "C++ API for D-BUS";
65     license = licenses.gpl2Plus;
66     platforms = platforms.linux;
67     maintainers = [ ];
68   };