Unverified Commit 43703b05 authored by Luke Granger-Brown's avatar Luke Granger-Brown Committed by GitHub
Browse files

yubioath-flutter: 7.1.1 -> 7.2.2 (#412231)

parents 308837b8 82594fba
Loading
Loading
Loading
Loading
+48 −29
Original line number Diff line number Diff line
{
  lib,
  flutter324,
  flutter332,
  python3,
  fetchFromGitHub,
  pcre2,
@@ -10,25 +10,27 @@
  gnome-screenshot,
  makeWrapper,
  removeReferencesTo,
  runCommand,
  yq,
  yubioath-flutter,
  _experimental-update-script-combinators,
  gitUpdater,
}:

flutter324.buildFlutterApplication rec {
flutter332.buildFlutterApplication rec {
  pname = "yubioath-flutter";
  version = "7.1.1";
  version = "7.2.2";

  src = fetchFromGitHub {
    owner = "Yubico";
    repo = "yubioath-flutter";
    rev = version;
    hash = "sha256-MpY6yJvGBaFiEwuGEme2Uvyi5INCYhZJHyaRpC9pCuk=";
    tag = version;
    hash = "sha256-XkRSyy845hxQX5Ew5Sx3ZLh9UXfFMF6YdZJx+p/PJpo=";
  };

  passthru.helper = python3.pkgs.callPackage ./helper.nix { inherit src version meta; };

  pubspecLock = lib.importJSON ./pubspec.lock.json;
  gitHashes = {
    window_manager = "sha256-mLX51nbWFccsAfcqLQIYDjYz69y9wAz4U1RZ8TIYSj0=";
  };

  gitHashes.window_manager = "sha256-WKcNwEOthXj1S2lKlpdhy+r8JZslVqhwY2ywXeTSBEs=";

  postPatch = ''
    rm -f pubspec.lock
@@ -37,6 +39,18 @@ flutter324.buildFlutterApplication rec {
      --replace-fail "../build/linux/helper" "${passthru.helper}/libexec/helper"
  '';

  nativeBuildInputs = [
    makeWrapper
    removeReferencesTo
    pkg-config
  ];

  buildInputs = [
    pcre2
    libnotify
    libappindicator
  ];

  preInstall = ''
    # Make sure we have permission to delete things CMake has copied in to our build directory from elsewhere.
    chmod -R +w build
@@ -47,8 +61,8 @@ flutter324.buildFlutterApplication rec {
    ln -fs "${passthru.helper}/bin/authenticator-helper" "$out/app/$pname/helper/authenticator-helper"

    # Move the icon.
    mkdir $out/share/icons
    mv $out/app/$pname/linux_support/com.yubico.yubioath.png $out/share/icons
    mkdir $out/share/pixmaps
    mv $out/app/$pname/linux_support/com.yubico.yubioath.png $out/share/pixmaps

    # Cleanup.
    rm -rf \
@@ -61,9 +75,9 @@ flutter324.buildFlutterApplication rec {
    ln -sf "$out/app/$pname/authenticator" "$out/bin/yubioath-flutter"

    # Set the correct path to the binary in desktop file.
    substituteInPlace "$out/share/applications/com.yubico.authenticator.desktop" \
      --replace "@EXEC_PATH/authenticator" "$out/bin/yubioath-flutter" \
      --replace "@EXEC_PATH/linux_support/com.yubico.yubioath.png" "$out/share/icons/com.yubico.yubioath.png"
    substituteInPlace "$out/share/applications/com.yubico.yubioath.desktop" \
      --replace-fail '"@EXEC_PATH/authenticator"' "yubioath-flutter" \
      --replace-fail "@EXEC_PATH/linux_support/com.yubico.yubioath.png" "com.yubico.yubioath"
  '';

  # Needed for QR scanning to work
@@ -71,24 +85,29 @@ flutter324.buildFlutterApplication rec {
    --prefix PATH : ${lib.makeBinPath [ gnome-screenshot ]}
  '';

  nativeBuildInputs = [
    makeWrapper
    removeReferencesTo
    pkg-config
  ];

  buildInputs = [
    pcre2
    libnotify
    libappindicator
  passthru = {
    helper = python3.pkgs.callPackage ./helper.nix { inherit src version meta; };
    pubspecSource =
      runCommand "pubspec.lock.json"
        {
          nativeBuildInputs = [ yq ];
          inherit (yubioath-flutter) src;
        }
        ''
          cat $src/pubspec.lock | yq > $out
        '';
    updateScript = _experimental-update-script-combinators.sequence [
      (gitUpdater { })
      (_experimental-update-script-combinators.copyAttrOutputToFile "yubioath-flutter.pubspecSource" ./pubspec.lock.json)
    ];
  };

  meta = with lib; {
  meta = {
    description = "Yubico Authenticator for Desktop";
    mainProgram = "yubioath-flutter";
    homepage = "https://github.com/Yubico/yubioath-flutter";
    license = licenses.asl20;
    maintainers = with maintainers; [ lukegb ];
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ lukegb ];
    platforms = [
      "x86_64-linux"
      "aarch64-linux"
+279 −225

File changed.

Preview size limit exceeded, changes collapsed.