Skip to content

Commit 43703b0

Browse files
authored
yubioath-flutter: 7.1.1 -> 7.2.2 (#412231)
2 parents 308837b + 82594fb commit 43703b0

File tree

2 files changed

+327
-254
lines changed

2 files changed

+327
-254
lines changed

pkgs/by-name/yu/yubioath-flutter/package.nix

Lines changed: 48 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
lib,
3-
flutter324,
3+
flutter332,
44
python3,
55
fetchFromGitHub,
66
pcre2,
@@ -10,25 +10,27 @@
1010
gnome-screenshot,
1111
makeWrapper,
1212
removeReferencesTo,
13+
runCommand,
14+
yq,
15+
yubioath-flutter,
16+
_experimental-update-script-combinators,
17+
gitUpdater,
1318
}:
1419

15-
flutter324.buildFlutterApplication rec {
20+
flutter332.buildFlutterApplication rec {
1621
pname = "yubioath-flutter";
17-
version = "7.1.1";
22+
version = "7.2.2";
1823

1924
src = fetchFromGitHub {
2025
owner = "Yubico";
2126
repo = "yubioath-flutter";
22-
rev = version;
23-
hash = "sha256-MpY6yJvGBaFiEwuGEme2Uvyi5INCYhZJHyaRpC9pCuk=";
27+
tag = version;
28+
hash = "sha256-XkRSyy845hxQX5Ew5Sx3ZLh9UXfFMF6YdZJx+p/PJpo=";
2429
};
2530

26-
passthru.helper = python3.pkgs.callPackage ./helper.nix { inherit src version meta; };
27-
2831
pubspecLock = lib.importJSON ./pubspec.lock.json;
29-
gitHashes = {
30-
window_manager = "sha256-mLX51nbWFccsAfcqLQIYDjYz69y9wAz4U1RZ8TIYSj0=";
31-
};
32+
33+
gitHashes.window_manager = "sha256-WKcNwEOthXj1S2lKlpdhy+r8JZslVqhwY2ywXeTSBEs=";
3234

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

42+
nativeBuildInputs = [
43+
makeWrapper
44+
removeReferencesTo
45+
pkg-config
46+
];
47+
48+
buildInputs = [
49+
pcre2
50+
libnotify
51+
libappindicator
52+
];
53+
4054
preInstall = ''
4155
# Make sure we have permission to delete things CMake has copied in to our build directory from elsewhere.
4256
chmod -R +w build
@@ -47,8 +61,8 @@ flutter324.buildFlutterApplication rec {
4761
ln -fs "${passthru.helper}/bin/authenticator-helper" "$out/app/$pname/helper/authenticator-helper"
4862
4963
# Move the icon.
50-
mkdir $out/share/icons
51-
mv $out/app/$pname/linux_support/com.yubico.yubioath.png $out/share/icons
64+
mkdir $out/share/pixmaps
65+
mv $out/app/$pname/linux_support/com.yubico.yubioath.png $out/share/pixmaps
5266
5367
# Cleanup.
5468
rm -rf \
@@ -61,34 +75,39 @@ flutter324.buildFlutterApplication rec {
6175
ln -sf "$out/app/$pname/authenticator" "$out/bin/yubioath-flutter"
6276
6377
# Set the correct path to the binary in desktop file.
64-
substituteInPlace "$out/share/applications/com.yubico.authenticator.desktop" \
65-
--replace "@EXEC_PATH/authenticator" "$out/bin/yubioath-flutter" \
66-
--replace "@EXEC_PATH/linux_support/com.yubico.yubioath.png" "$out/share/icons/com.yubico.yubioath.png"
78+
substituteInPlace "$out/share/applications/com.yubico.yubioath.desktop" \
79+
--replace-fail '"@EXEC_PATH/authenticator"' "yubioath-flutter" \
80+
--replace-fail "@EXEC_PATH/linux_support/com.yubico.yubioath.png" "com.yubico.yubioath"
6781
'';
6882

6983
# Needed for QR scanning to work
7084
extraWrapProgramArgs = ''
7185
--prefix PATH : ${lib.makeBinPath [ gnome-screenshot ]}
7286
'';
7387

74-
nativeBuildInputs = [
75-
makeWrapper
76-
removeReferencesTo
77-
pkg-config
78-
];
79-
80-
buildInputs = [
81-
pcre2
82-
libnotify
83-
libappindicator
84-
];
88+
passthru = {
89+
helper = python3.pkgs.callPackage ./helper.nix { inherit src version meta; };
90+
pubspecSource =
91+
runCommand "pubspec.lock.json"
92+
{
93+
nativeBuildInputs = [ yq ];
94+
inherit (yubioath-flutter) src;
95+
}
96+
''
97+
cat $src/pubspec.lock | yq > $out
98+
'';
99+
updateScript = _experimental-update-script-combinators.sequence [
100+
(gitUpdater { })
101+
(_experimental-update-script-combinators.copyAttrOutputToFile "yubioath-flutter.pubspecSource" ./pubspec.lock.json)
102+
];
103+
};
85104

86-
meta = with lib; {
105+
meta = {
87106
description = "Yubico Authenticator for Desktop";
88107
mainProgram = "yubioath-flutter";
89108
homepage = "https://github.com/Yubico/yubioath-flutter";
90-
license = licenses.asl20;
91-
maintainers = with maintainers; [ lukegb ];
109+
license = lib.licenses.asl20;
110+
maintainers = with lib.maintainers; [ lukegb ];
92111
platforms = [
93112
"x86_64-linux"
94113
"aarch64-linux"

0 commit comments

Comments
 (0)