1{ lib
2, stdenv
3, fetchFromGitLab
4, appstream-glib
5, cargo
6, desktop-file-utils
7, meson
8, ninja
9, pkg-config
10, rustPlatform
11, rustc
12, wrapGAppsHook4
13, gdk-pixbuf
14, glib
15, gst_all_1
16, gtk4
17, libadwaita
18, openssl
19, pipewire
20, sqlite
21, wayland
22, zbar
23}:
24
25stdenv.mkDerivation rec {
26 pname = "authenticator";
27 version = "4.3.0";
28
29 src = fetchFromGitLab {
30 domain = "gitlab.gnome.org";
31 owner = "World";
32 repo = "Authenticator";
33 rev = version;
34 hash = "sha256-WR5gXGry4wti2M4D/IQvwI7OSak1p+O+XAhr01hdv2Q=";
35 };
36
37 cargoDeps = rustPlatform.fetchCargoTarball {
38 inherit src;
39 name = "${pname}-${version}";
40 hash = "sha256-ZVDKTJojblVCbbdtnqcL+UVW1vkmu99AXCbgyCGNHCM=";
41 };
42
43 nativeBuildInputs = [
44 appstream-glib
45 desktop-file-utils
46 meson
47 ninja
48 pkg-config
49 wrapGAppsHook4
50 rustPlatform.cargoSetupHook
51 cargo
52 rustc
53 rustPlatform.bindgenHook
54 ];
55
56 buildInputs = [
57 gdk-pixbuf
58 glib
59 gst_all_1.gstreamer
60 gst_all_1.gst-plugins-base
61 (gst_all_1.gst-plugins-bad.override { enableZbar = true; })
62 gtk4
63 libadwaita
64 openssl
65 pipewire
66 sqlite
67 wayland
68 zbar
69 ];
70
71 meta = {
72 description = "Two-factor authentication code generator for GNOME";
73 homepage = "https://gitlab.gnome.org/World/Authenticator";
74 license = lib.licenses.gpl3Plus;
75 maintainers = with lib.maintainers; [ austinbutler ];
76 platforms = lib.platforms.linux;
77 };
78}