windsend: init at 1.5.1 (#396431)
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
flutter329,
|
||||
copyDesktopItems,
|
||||
makeDesktopItem,
|
||||
}:
|
||||
|
||||
flutter329.buildFlutterApplication rec {
|
||||
pname = "windsend";
|
||||
version = "1.5.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "doraemonkeys";
|
||||
repo = "WindSend";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-mE2pygb4o9gRUdgX/eVsr6WtZxIadxADg+3dpQgP0Ic=";
|
||||
};
|
||||
|
||||
pubspecLock = lib.importJSON ./pubspec.lock.json;
|
||||
|
||||
gitHashes = {
|
||||
open_filex = "sha256-dKLOmk+C9Rzw0wq18I5hkR2T4VcdmT4coimmgF+GzV8=";
|
||||
media_scanner = "sha256-vlHsSmw0/bVDSwB/jwdj/flfcizDjYKHOItOb/jWQGM=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/flutter/wind_send";
|
||||
|
||||
nativeBuildInputs = [ copyDesktopItems ];
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = "windsend";
|
||||
exec = "WindSend";
|
||||
icon = "windsend";
|
||||
desktopName = "WindSend";
|
||||
})
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
install -Dm644 ../../app_icon/web/icon-512.png $out/share/pixmaps/windsend.png
|
||||
'';
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
meta = {
|
||||
description = "Quickly and securely sync clipboard, transfer files and directories between devices";
|
||||
homepage = "https://github.com/doraemonkeys/WindSend";
|
||||
mainProgram = "WindSend";
|
||||
license = with lib.licenses; [ mit ];
|
||||
maintainers = with lib.maintainers; [ emaryn ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Executable
+34
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p yq nix bash coreutils nix-update common-updater-scripts ripgrep flutter
|
||||
|
||||
set -eou pipefail
|
||||
|
||||
PACKAGE_DIR="$(realpath "$(dirname "$0")")"
|
||||
cd "$PACKAGE_DIR"/..
|
||||
while ! test -f flake.nix; do cd ..; done
|
||||
NIXPKGS_DIR="$PWD"
|
||||
|
||||
latestVersion=$(
|
||||
list-git-tags --url=https://github.com/doraemonkeys/WindSend |
|
||||
rg '^v(.*)' -r '$1' |
|
||||
sort --version-sort |
|
||||
tail -n1
|
||||
)
|
||||
|
||||
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; windsend.version or (lib.getVersion windsend)" | tr -d '"')
|
||||
|
||||
if [[ "$currentVersion" == "$latestVersion" ]]; then
|
||||
echo "package is up-to-date: $currentVersion"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
nix-update --version=$latestVersion windsend
|
||||
|
||||
export HOME="$(mktemp -d)"
|
||||
src="$(nix-build --no-link "$NIXPKGS_DIR" -A windsend.src)"
|
||||
TMPDIR="$(mktemp -d)"
|
||||
cp --recursive --no-preserve=mode "$src"/* $TMPDIR
|
||||
cd "$TMPDIR"/flutter/wind_send
|
||||
flutter pub get
|
||||
yq . pubspec.lock >"$PACKAGE_DIR"/pubspec.lock.json
|
||||
rm -rf $TMPDIR
|
||||
Reference in New Issue
Block a user