Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ gtkWidgets ? false # build GTK widgets for libinfinity 2, avahiSupport ? false # build support for Avahi in libinfinity 3, lib, stdenv, fetchurl, pkg-config, glib, libxml2, gnutls, gsasl 4, gobject-introspection 5, gtk3 ? null, gtk-doc, docbook_xsl, docbook_xml_dtd_412, avahi ? null, libdaemon, libidn, gss 6, libintl }: 7 8assert avahiSupport -> avahi != null; 9assert gtkWidgets -> gtk3 != null; 10 11let 12 self = stdenv.mkDerivation rec { 13 pname = "libinfinity"; 14 version = "0.7.2"; 15 src = fetchurl { 16 url = "https://github.com/gobby/${pname}/releases/download/${version}/${pname}-${version}.tar.gz"; 17 sha256 = "17i3g61hxz9pzl3ryd1yr15142r25m06jfzjrpdy7ic1b8vjjw3f"; 18 }; 19 20 outputs = [ "bin" "out" "dev" "man" "devdoc" ]; 21 22 nativeBuildInputs = [ pkg-config gtk-doc docbook_xsl docbook_xml_dtd_412 gobject-introspection ]; 23 buildInputs = [ glib libxml2 gsasl libidn gss libintl libdaemon ] 24 ++ lib.optional gtkWidgets gtk3 25 ++ lib.optional avahiSupport avahi; 26 27 propagatedBuildInputs = [ gnutls ]; 28 29 configureFlags = [ 30 (lib.enableFeature true "gtk-doc") 31 (lib.enableFeature true "introspection") 32 (lib.withFeature gtkWidgets "inftextgtk") 33 (lib.withFeature gtkWidgets "infgtk") 34 (lib.withFeature true "infinoted") 35 (lib.withFeature true "libdaemon") 36 (lib.withFeature avahiSupport "avahi") 37 ]; 38 39 passthru = { 40 infinoted = "${self.bin}/bin/infinoted-${lib.versions.majorMinor version}"; 41 }; 42 43 meta = { 44 homepage = "https://gobby.github.io/"; 45 description = "An implementation of the Infinote protocol written in GObject-based C"; 46 license = lib.licenses.lgpl2Plus; 47 maintainers = [ ]; 48 platforms = with lib.platforms; linux ++ darwin; 49 }; 50 }; 51in self