lol
at master 99 lines 2.1 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitLab, 5 appstream-glib, 6 cargo, 7 desktop-file-utils, 8 meson, 9 ninja, 10 pkg-config, 11 rustPlatform, 12 rustc, 13 wrapGAppsHook4, 14 gdk-pixbuf, 15 glib, 16 gst_all_1, 17 gtk4, 18 libadwaita, 19 openssl, 20 pipewire, 21 sqlite, 22 wayland, 23 zbar, 24 glycin-loaders, 25 nix-update-script, 26}: 27 28stdenv.mkDerivation (finalAttrs: { 29 pname = "authenticator"; 30 version = "4.6.2"; 31 32 src = fetchFromGitLab { 33 domain = "gitlab.gnome.org"; 34 owner = "World"; 35 repo = "Authenticator"; 36 tag = finalAttrs.version; 37 hash = "sha256-UvHIVUed4rxmjliaZ7jnwCjiHyvUDihoJyG3G+fYtow="; 38 }; 39 40 cargoDeps = rustPlatform.fetchCargoVendor { 41 inherit (finalAttrs) pname version src; 42 hash = "sha256-iOIGm3egVtVM6Eb3W5/ys9nQV5so0dnv2ZODjQwrVyw="; 43 }; 44 45 strictDeps = true; 46 47 nativeBuildInputs = [ 48 appstream-glib 49 desktop-file-utils 50 meson 51 ninja 52 pkg-config 53 wrapGAppsHook4 54 rustPlatform.cargoSetupHook 55 cargo 56 rustc 57 rustPlatform.bindgenHook 58 ]; 59 60 buildInputs = [ 61 gdk-pixbuf 62 glib 63 gst_all_1.gstreamer 64 gst_all_1.gst-plugins-base 65 (gst_all_1.gst-plugins-bad.override { enableZbar = true; }) 66 gst_all_1.gst-plugins-good 67 gst_all_1.gst-plugins-rs 68 gtk4 69 libadwaita 70 openssl 71 pipewire 72 sqlite 73 wayland 74 zbar 75 ]; 76 77 preFixup = '' 78 gappsWrapperArgs+=( 79 # vp8enc preset 80 --prefix GST_PRESET_PATH : "${gst_all_1.gst-plugins-good}/share/gstreamer-1.0/presets" 81 # See https://gitlab.gnome.org/sophie-h/glycin/-/blob/0.1.beta.2/glycin/src/config.rs#L44 82 --prefix XDG_DATA_DIRS : "${glycin-loaders}/share" 83 ) 84 ''; 85 86 passthru = { 87 updateScript = nix-update-script { }; 88 }; 89 90 meta = { 91 description = "Two-factor authentication code generator for GNOME"; 92 mainProgram = "authenticator"; 93 homepage = "https://gitlab.gnome.org/World/Authenticator"; 94 license = lib.licenses.gpl3Plus; 95 maintainers = with lib.maintainers; [ austinbutler ]; 96 teams = [ lib.teams.gnome-circle ]; 97 platforms = lib.platforms.linux; 98 }; 99})