about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libepc
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-11-19 17:14:52 +0100
committerAlyssa Ross <hi@alyssa.is>2023-11-19 17:14:52 +0100
commitf4d4283e3992c3f559831b1c030cd1fda6d45f98 (patch)
treec2cc63060849298d9a8e7a329010bb0fc4abb219 /nixpkgs/pkgs/development/libraries/libepc
parentdac53cd746c10feddd48d4a1981235a653d7d32a (diff)
parent0ace63bed8f561e4cc5b1c8fa5fee6be61fbcf8b (diff)
downloadnixlib-f4d4283e3992c3f559831b1c030cd1fda6d45f98.tar
nixlib-f4d4283e3992c3f559831b1c030cd1fda6d45f98.tar.gz
nixlib-f4d4283e3992c3f559831b1c030cd1fda6d45f98.tar.bz2
nixlib-f4d4283e3992c3f559831b1c030cd1fda6d45f98.tar.lz
nixlib-f4d4283e3992c3f559831b1c030cd1fda6d45f98.tar.xz
nixlib-f4d4283e3992c3f559831b1c030cd1fda6d45f98.tar.zst
nixlib-f4d4283e3992c3f559831b1c030cd1fda6d45f98.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs into HEAD
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libepc')
-rw-r--r--nixpkgs/pkgs/development/libraries/libepc/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/libepc/no-avahi-ui.patch36
2 files changed, 65 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libepc/default.nix b/nixpkgs/pkgs/development/libraries/libepc/default.nix
index 9755d0977c85..a2822eae8d54 100644
--- a/nixpkgs/pkgs/development/libraries/libepc/default.nix
+++ b/nixpkgs/pkgs/development/libraries/libepc/default.nix
@@ -1,30 +1,51 @@
-{ lib, stdenv, fetchurl, pkg-config, intltool, gtk-doc, glib, avahi, gnutls, libuuid, libsoup, gtk3, gnome }:
+{ stdenv
+, lib
+, fetchurl
+, autoreconfHook
+, pkg-config
+, intltool
+, gtk-doc
+, glib
+, avahi
+, gnutls
+, libuuid
+, libsoup
+, gtk3
+, gnome
+}:
 
-let
-  avahiWithGtk = avahi.override { gtk3Support = true; };
-in stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "libepc";
   version = "0.4.6";
 
   outputs = [ "out" "dev" "devdoc" ];
 
   src = fetchurl {
-    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    url = "mirror://gnome/sources/libepc/${lib.versions.majorMinor finalAttrs.version}/libepc-${finalAttrs.version}.tar.xz";
     sha256 = "1s3svb2slqjsrqfv50c2ymnqcijcxb5gnx6bfibwh9l5ga290n91";
   };
 
+  patches = [
+    # Remove dependency that is only needed by uninstalled examples.
+    ./no-avahi-ui.patch
+  ];
+
   nativeBuildInputs = [
+    autoreconfHook
+    gnome.gnome-common
     pkg-config
     intltool
     gtk-doc
   ];
+
   buildInputs = [
     glib
     libuuid
     gtk3
   ];
+
   propagatedBuildInputs = [
-    avahiWithGtk
+    avahi
     gnutls
     libsoup
   ];
@@ -33,7 +54,7 @@ in stdenv.mkDerivation rec {
 
   passthru = {
     updateScript = gnome.updateScript {
-      packageName = pname;
+      packageName = "libepc";
       versionPolicy = "odd-unstable";
     };
   };
@@ -45,4 +66,4 @@ in stdenv.mkDerivation rec {
     maintainers = teams.gnome.members;
     platforms = platforms.linux;
   };
-}
+})
diff --git a/nixpkgs/pkgs/development/libraries/libepc/no-avahi-ui.patch b/nixpkgs/pkgs/development/libraries/libepc/no-avahi-ui.patch
new file mode 100644
index 000000000000..4649ecbe27ce
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libepc/no-avahi-ui.patch
@@ -0,0 +1,36 @@
+diff --git a/Makefile.am b/Makefile.am
+index acf0d25..13022d1 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -32,8 +32,6 @@ noinst_PROGRAMS = \
+ 	examples/lookup-resource \
+ 	examples/service-browser \
+ 	examples/simple-publisher \
+-	examples/consumer-ui \
+-	examples/publisher-ui \
+ 	examples/server-credentials \
+ 	$(TESTS)
+ TESTS = \
+@@ -155,10 +153,6 @@ examples_service_browser_LDADD			= $(example_epc_libs)
+ examples_simple_publisher_CFLAGS		= $(example_epc_cflags)
+ examples_simple_publisher_LDADD			= $(example_epc_libs)
+ 
+-examples_consumer_ui_CFLAGS			= $(example_epc_ui_cflags) $(AVAHI_UI_CFLAGS)
+-examples_consumer_ui_LDADD			= $(example_epc_ui_libs) $(AVAHI_UI_LIBS)
+-examples_publisher_ui_CFLAGS			= $(example_epc_ui_cflags) $(AVAHI_UI_CFLAGS) -rdynamic
+-examples_publisher_ui_LDADD			= $(example_epc_ui_libs) $(AVAHI_UI_LIBS)
+ examples_server_credentials_CFLAGS		= $(example_epc_ui_cflags)
+ examples_server_credentials_LDADD		= $(example_epc_ui_libs)
+ 
+diff --git a/configure.ac b/configure.ac
+index d68bf94..89bd471 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -53,7 +53,6 @@ PKG_CHECK_EXISTS([$GIO_REQUIREMENT],
+                   GIO=$GIO_REQUIREMENT],
+                  [AC_MSG_RESULT([no])])
+ 
+-PKG_CHECK_MODULES(AVAHI_UI,  [avahi-ui-gtk3     >= 0.6])
+ PKG_CHECK_MODULES(LIBEPC,    [avahi-client >= 0.6
+                               avahi-glib   >= 0.6
+                               glib-2.0     >= 2.36