nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 135 lines 2.8 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitLab, 5 meson, 6 mesonEmulatorHook, 7 ninja, 8 pkg-config, 9 libadwaita, 10 libsecret, 11 modemmanager, 12 gtk4, 13 gom, 14 gsound, 15 feedbackd, 16 callaudiod, 17 evolution-data-server-gtk4, 18 folks, 19 desktop-file-utils, 20 appstream-glib, 21 libpeas2, 22 dbus, 23 vala, 24 wrapGAppsHook4, 25 xvfb-run, 26 gtk-doc, 27 bubblewrap, 28 docbook-xsl-nons, 29 docbook_xml_dtd_43, 30 docutils, 31 gst_all_1, 32 shared-mime-info, 33 sofia_sip, 34 writeShellScriptBin, 35}: 36 37stdenv.mkDerivation (finalAttrs: { 38 pname = "calls"; 39 version = "48.2"; 40 41 src = fetchFromGitLab { 42 domain = "gitlab.gnome.org"; 43 owner = "GNOME"; 44 repo = "calls"; 45 rev = "v${finalAttrs.version}"; 46 fetchSubmodules = true; 47 hash = "sha256-S1YWFkwK1tcIUOfyOxlEFtKcLlRDiSKf4iUGnb+VlG8="; 48 }; 49 50 outputs = [ 51 "out" 52 "devdoc" 53 ]; 54 55 nativeBuildInputs = [ 56 meson 57 ninja 58 pkg-config 59 desktop-file-utils 60 appstream-glib 61 vala 62 wrapGAppsHook4 63 gtk-doc 64 docbook-xsl-nons 65 docbook_xml_dtd_43 66 docutils 67 ] 68 ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ 69 mesonEmulatorHook 70 ]; 71 72 buildInputs = [ 73 modemmanager 74 libadwaita 75 libsecret 76 evolution-data-server-gtk4 # UI part not needed, using gtk4 variant (over the default of gtk3) to reduce closure. 77 folks 78 gom 79 gsound 80 gst_all_1.gstreamer 81 gst_all_1.gst-plugins-base 82 gst_all_1.gst-plugins-good 83 gst_all_1.gst-plugins-bad 84 gst_all_1.gst-plugins-ugly 85 feedbackd 86 callaudiod 87 gtk4 88 libpeas2 89 sofia_sip 90 ]; 91 92 nativeCheckInputs = [ 93 (writeShellScriptBin "dbus-run-session" '' 94 # tests invoke `dbus-run-session` directly, but without the necessary `--config-file` argument 95 exec ${lib.getExe' dbus "dbus-run-session"} --config-file=${dbus}/share/dbus-1/session.conf "$@" 96 '') 97 bubblewrap 98 dbus 99 shared-mime-info 100 xvfb-run 101 ]; 102 103 mesonFlags = [ 104 (lib.mesonBool "gtk_doc" true) 105 (lib.mesonBool "tests" finalAttrs.finalPackage.doCheck) 106 ]; 107 108 strictDeps = true; 109 doCheck = true; 110 111 preFixup = '' 112 gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "${shared-mime-info}/share") 113 ''; 114 115 checkPhase = '' 116 runHook preCheck 117 118 HOME=$(mktemp -d) \ 119 xvfb-run -s '-screen 0 800x600x24' \ 120 bwrap --unshare-uts --hostname 127.0.0.1 --dev-bind / / \ 121 meson test --no-rebuild --print-errorlogs 122 123 runHook postCheck 124 ''; 125 126 meta = with lib; { 127 description = "Phone dialer and call handler"; 128 longDescription = "GNOME Calls is a phone dialer and call handler. Setting NixOS option `programs.calls.enable = true` is recommended."; 129 homepage = "https://gitlab.gnome.org/GNOME/calls"; 130 license = licenses.gpl3Plus; 131 maintainers = with maintainers; [ craigem ]; 132 platforms = platforms.linux; 133 mainProgram = "gnome-calls"; 134 }; 135})