about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/authenticator
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-06-22 15:01:47 +0000
committerAlyssa Ross <hi@alyssa.is>2021-06-22 16:57:59 +0000
commit633cab0ecb07627706c6b523e219490f019eaab5 (patch)
tree4fb472bdfe2723037dad53dc1b8a87c939015f5e /nixpkgs/pkgs/applications/misc/authenticator
parentffb691c199e7e0cbc4e45e5310779c9e3f7c2a73 (diff)
parent432fc2d9a67f92e05438dff5fdc2b39d33f77997 (diff)
downloadnixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar
nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.gz
nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.bz2
nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.lz
nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.xz
nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.zst
nixlib-633cab0ecb07627706c6b523e219490f019eaab5.zip
Merge commit '432fc2d9a67f92e05438dff5fdc2b39d33f77997'
# Conflicts:
#	nixpkgs/pkgs/applications/editors/emacs/elisp-packages/elpa-generated.nix
#	nixpkgs/pkgs/applications/networking/mailreaders/thunderbird/default.nix
#	nixpkgs/pkgs/applications/window-managers/sway/default.nix
#	nixpkgs/pkgs/build-support/rust/default.nix
#	nixpkgs/pkgs/development/go-modules/generic/default.nix
Diffstat (limited to 'nixpkgs/pkgs/applications/misc/authenticator')
-rw-r--r--nixpkgs/pkgs/applications/misc/authenticator/default.nix99
1 files changed, 99 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/misc/authenticator/default.nix b/nixpkgs/pkgs/applications/misc/authenticator/default.nix
new file mode 100644
index 000000000000..46b61720d0a3
--- /dev/null
+++ b/nixpkgs/pkgs/applications/misc/authenticator/default.nix
@@ -0,0 +1,99 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, fetchpatch
+, appstream-glib
+, desktop-file-utils
+, meson
+, ninja
+, pkg-config
+, python3
+, rustPlatform
+, wrapGAppsHook
+, gdk-pixbuf
+, glib
+, gst_all_1
+, gtk4
+, libadwaita
+, openssl
+, sqlite
+, wayland
+, zbar
+}:
+
+stdenv.mkDerivation rec {
+  pname = "authenticator";
+  version = "4.0.3";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.gnome.org";
+    owner = "World";
+    repo = "Authenticator";
+    rev = version;
+    sha256 = "0fvs76f3fm5pxn7wg6sjbqpgip5w2j7xrh4siasdcl2bx6vsld8b";
+  };
+
+  cargoDeps = rustPlatform.fetchCargoTarball {
+    inherit src;
+    name = "${pname}-${version}";
+    sha256 = "1s97jyszxf24rs3ni11phiyvmp1wm8sicb0rh1jgwz4bn1cnakx4";
+  };
+
+  postPatch = ''
+    patchShebangs build-aux
+  '';
+
+  nativeBuildInputs = [
+    appstream-glib
+    desktop-file-utils
+    meson
+    ninja
+    pkg-config
+    python3
+    wrapGAppsHook
+  ] ++ (with rustPlatform; [
+    cargoSetupHook
+    rust.cargo
+    rust.rustc
+  ]);
+
+  buildInputs = [
+    gdk-pixbuf
+    glib
+    gst_all_1.gstreamer
+    gst_all_1.gst-plugins-base
+
+    # gst-plugins-good needs gtk4 support:
+    # https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/767
+    # We copy the way it is built from the Flatpak:
+    # https://gitlab.gnome.org/World/Authenticator/-/blob/master/build-aux/com.belmoussaoui.Authenticator.Devel.json
+    (gst_all_1.gst-plugins-good.overrideAttrs (old: {
+      patches = old.patches or [ ] ++ [
+        "${src}/build-aux/767.patch"
+      ];
+      mesonFlags = old.mesonFlags ++ [
+        "-Dgtk3=disabled"
+        "-Dgtk4=enabled"
+        "-Dgtk4-experiments=true"
+      ];
+      buildInputs = old.buildInputs ++ [
+        gtk4
+      ];
+    }))
+
+    (gst_all_1.gst-plugins-bad.override { enableZbar = true; })
+    gtk4
+    libadwaita
+    openssl
+    sqlite
+    wayland
+    zbar
+  ];
+
+  meta = with lib; {
+    description = "Two-factor authentication code generator for GNOME";
+    homepage = "https://gitlab.gnome.org/World/Authenticator";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ dotlambda ];
+  };
+}