saber: 0.25.3 -> 0.25.4

This commit is contained in:
emaryn
2025-03-29 19:12:47 +08:00
parent b98b14df4c
commit 1bd6fbf055
2 changed files with 250 additions and 200 deletions
+29 -9
View File
@@ -1,23 +1,29 @@
{
lib,
fetchFromGitHub,
flutter327,
flutter329,
gst_all_1,
libunwind,
orc,
webkitgtk_4_1,
autoPatchelfHook,
xorg,
runCommand,
yq,
saber,
_experimental-update-script-combinators,
gitUpdater,
}:
flutter327.buildFlutterApplication rec {
flutter329.buildFlutterApplication rec {
pname = "saber";
version = "0.25.3";
version = "0.25.4";
src = fetchFromGitHub {
owner = "saber-notes";
repo = "saber";
tag = "v${version}";
hash = "sha256-plBcZo67/x8KcND28jqfrwbvI9IZz8ptLZoGl2y2vW4=";
hash = "sha256-3ZTvGF5Ip6VTmyeuuZoJaGO1dDOee5GuRp6/YxSz27c=";
};
gitHashes = {
@@ -27,9 +33,7 @@ flutter327.buildFlutterApplication rec {
pubspecLock = lib.importJSON ./pubspec.lock.json;
nativeBuildInputs = [
autoPatchelfHook
];
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [
gst_all_1.gstreamer
@@ -41,8 +45,8 @@ flutter327.buildFlutterApplication rec {
];
postInstall = ''
install -Dm0644 ./flatpak/com.adilhanney.saber.desktop $out/share/applications/com.adilhanney.saber.desktop
install -Dm0644 ./assets/icon/icon.svg $out/share/icons/hicolor/scalable/apps/com.adilhanney.saber.svg
install -Dm0644 flatpak/com.adilhanney.saber.desktop $out/share/applications/saber.desktop
install -Dm0644 assets/icon/icon.svg $out/share/icons/hicolor/scalable/apps/com.adilhanney.saber.svg
'';
preFixup = ''
@@ -50,6 +54,22 @@ flutter327.buildFlutterApplication rec {
patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" $out/app/saber/lib/lib*.so
'';
passthru = {
pubspecSource =
runCommand "pubspec.lock.json"
{
nativeBuildInputs = [ yq ];
inherit (saber) src;
}
''
cat $src/pubspec.lock | yq > $out
'';
updateScript = _experimental-update-script-combinators.sequence [
(gitUpdater { rev-prefix = "v"; })
(_experimental-update-script-combinators.copyAttrOutputToFile "saber.pubspecSource" ./pubspec.lock.json)
];
};
meta = {
description = "Cross-platform open-source app built for handwriting";
homepage = "https://github.com/saber-notes/saber";
File diff suppressed because it is too large Load Diff