Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 vala, 6 ninja, 7 wrapGAppsHook4, 8 pkg-config, 9 gettext, 10 gobject-introspection, 11 glib, 12 gdk-pixbuf, 13 gtk4, 14 glib-networking, 15 libadwaita, 16 libcanberra, 17 libnotify, 18 libsoup_3, 19 libgee, 20 libomemo-c, 21 libgcrypt, 22 meson, 23 sqlite, 24 gpgme, 25 qrencode, 26 icu, 27 srtp, 28 libnice, 29 gnutls, 30 gstreamer, 31 gst-plugins-base, 32 gst-plugins-good, 33 gst-plugins-bad, 34 gst-vaapi, 35 webrtc-audio-processing, 36}: 37 38stdenv.mkDerivation (finalAttrs: { 39 pname = "dino"; 40 version = "0.5.0"; 41 42 src = fetchFromGitHub { 43 owner = "dino"; 44 repo = "dino"; 45 tag = "v${finalAttrs.version}"; 46 hash = "sha256-Y3MGKpfhjmqnIvmt4mXnkmpjF/riXPDXyUiSrsceY6o="; 47 }; 48 49 postPatch = '' 50 echo ${finalAttrs.version} > VERSION 51 ''; 52 53 nativeBuildInputs = [ 54 vala 55 meson 56 ninja 57 pkg-config 58 wrapGAppsHook4 59 gettext 60 gobject-introspection 61 ]; 62 63 buildInputs = [ 64 qrencode 65 glib 66 glib-networking # required for TLS support 67 libadwaita 68 libgee 69 sqlite 70 gdk-pixbuf 71 gtk4 72 libnotify 73 gpgme 74 libgcrypt 75 libsoup_3 76 icu 77 libcanberra 78 libomemo-c 79 srtp 80 libnice 81 gnutls 82 gstreamer 83 gst-plugins-base 84 gst-plugins-good # contains rtpbin, required for VP9 85 gst-plugins-bad # required for H264, MSDK 86 gst-vaapi # required for VAAPI 87 webrtc-audio-processing 88 ]; 89 90 doCheck = true; 91 92 mesonFlags = [ 93 "-Dplugin-notification-sound=enabled" 94 "-Dplugin-rtp-h264=enabled" 95 "-Dplugin-rtp-msdk=enabled" 96 "-Dplugin-rtp-vaapi=enabled" 97 "-Dplugin-rtp-vp9=enabled" 98 ]; 99 100 # Undefined symbols for architecture arm64: "_gpg_strerror" 101 NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-lgpg-error"; 102 103 # Dino looks for plugins with a .so filename extension, even on macOS where 104 # .dylib is appropriate, and despite the fact that it builds said plugins with 105 # that as their filename extension 106 # 107 # Therefore, on macOS rename all of the plugins to use correct names that Dino 108 # will load 109 # 110 # See https://github.com/dino/dino/wiki/macOS 111 postFixup = lib.optionalString (stdenv.hostPlatform.isDarwin) '' 112 cd "$out/lib/dino/plugins/" 113 for f in *.dylib; do 114 mv "$f" "$(basename "$f" .dylib).so" 115 done 116 ''; 117 118 meta = with lib; { 119 description = "Modern Jabber/XMPP Client using GTK/Vala"; 120 mainProgram = "dino"; 121 homepage = "https://github.com/dino/dino"; 122 license = licenses.gpl3Plus; 123 platforms = platforms.linux ++ platforms.darwin; 124 maintainers = with maintainers; [ qyliss ]; 125 }; 126})