Skip to content

Commit 627f671

Browse files
rustdesk-flutter: 1.3.2 ->1.3.7 (#380265)
2 parents a181858 + 8a4fbb9 commit 627f671

File tree

9 files changed

+783
-8325
lines changed

9 files changed

+783
-8325
lines changed

pkgs/by-name/ru/rustdesk-flutter/Cargo.lock

Lines changed: 0 additions & 8202 deletions
This file was deleted.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!@bash@
2+
packagePath() {
3+
jq --raw-output --arg name "$1" '.packages.[] | select(.name == $name) .rootUri | sub("file://"; "")' .dart_tool/package_config.json
4+
}
5+
6+
# Runs a Dart executable from a package with a custom path.
7+
#
8+
# Usage:
9+
# packageRunCustom <package> [executable] [bin_dir]
10+
#
11+
# By default, [bin_dir] is "bin", and [executable] is <package>.
12+
# i.e. `packageRunCustom build_runner` is equivalent to `packageRunCustom build_runner build_runner bin`, which runs `bin/build_runner.dart` from the build_runner package.
13+
packageRunCustom() {
14+
local args=()
15+
local passthrough=()
16+
17+
while [ $# -gt 0 ]; do
18+
if [ "$1" != "--" ]; then
19+
args+=("$1")
20+
shift
21+
else
22+
shift
23+
passthrough=("$@")
24+
break
25+
fi
26+
done
27+
28+
local name="${args[0]}"
29+
local path="${args[1]:-$name}"
30+
local prefix="${args[2]:-bin}"
31+
32+
dart --packages=.dart_tool/package_config.json "$(packagePath "$name")/$prefix/$path.dart" "${passthrough[@]}"
33+
}
34+
35+
# Runs a Dart executable from a package.
36+
#
37+
# Usage:
38+
# packageRun <package> [-e executable] [...]
39+
#
40+
# To run an executable from an unconventional location, use packageRunCustom.
41+
packageRun() {
42+
local name="build_runner"
43+
shift
44+
45+
local executableName="$name"
46+
if [ "build_runner" = "-e" ]; then
47+
shift
48+
executableName="build_runner"
49+
shift
50+
fi
51+
52+
fileName="$(yq --raw-output --arg name "$executableName" '.executables.[$name] // $name' "$(packagePath "$name")/pubspec.yaml")"
53+
packageRunCustom "$name" "$fileName" -- "$@"
54+
}
55+
56+
packageRun build_runner "$@"
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
buildDartApplication,
3+
fetchFromGitHub,
4+
lib,
5+
flutter,
6+
}:
7+
8+
buildDartApplication rec {
9+
pname = "ffigen";
10+
version = "8.0.2"; # According to https://github.com/rustdesk/rustdesk/blob/master/build.py#L173. We should use 5.0.1. But It can't run on flutter324. So I found another old version.
11+
12+
src = fetchFromGitHub {
13+
owner = "dart-lang";
14+
repo = "native";
15+
tag = "ffigen-v${version}";
16+
hash = "sha256-TUtgdT8huyo9sharIMHZ998UzzfMq2gj9Q9aspXYumU=";
17+
};
18+
19+
postBuild = ''
20+
mkdir -p $out/bin
21+
ln -s ${flutter}/bin/dart $out/bin/dart
22+
'';
23+
24+
sourceRoot = "${src.name}/pkgs/ffigen";
25+
pubspecLock = lib.importJSON ./ffigen.pubspec.lock.json;
26+
dartEntryPoints."bin/ffigen" = "bin/ffigen.dart";
27+
28+
meta.mainProgram = "ffigen";
29+
meta.license = lib.licenses.bsd3;
30+
}

0 commit comments

Comments
 (0)