Unverified Commit 85b9a689 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

pilipalax: 1.0.22-beta.12+174 -> 1.1.0-beta.5 (#367631)

parents 1ee81605 d95d75e8
Loading
Loading
Loading
Loading
+10 −64
Original line number Diff line number Diff line
@@ -4,48 +4,20 @@
  fetchFromGitHub,
  flutter324,
  mpv,
  libass,
  ffmpeg,
  libplacebo,
  libunwind,
  shaderc,
  vulkan-loader,
  lcms,
  libdovi,
  libdvdnav,
  libdvdread,
  mujs,
  libbluray,
  lua,
  rubberband,
  libuchardet,
  zimg,
  alsa-lib,
  openal,
  pipewire,
  libpulseaudio,
  libcaca,
  libdrm,
  libgbm,
  libXScrnSaver,
  nv-codec-headers-11,
  libXpresent,
  libva,
  libvdpau,
  pkg-config,
  makeDesktopItem,
  wrapGAppsHook3,
  copyDesktopItems,
}:

flutter324.buildFlutterApplication rec {
  pname = "pilipalax";
  version = "1.0.22-beta.12+174";
  version = "1.1.0-beta.5";

  src = fetchFromGitHub {
    owner = "orz12";
    repo = "PiliPalaX";
    tag = version;
    hash = "sha256-Qjqyg9y5R70hODGfVClS505dJwexL0BbUm6lXSHzhJs=";
    tag = "${version}+180";
    hash = "sha256-bKs0EZjJCJvtVOZYl3GqXPE2MxX7DRjMwtmFUcNgrOQ=";
  };

  pubspecLock = lib.importJSON ./pubspec.lock.json;
@@ -61,48 +33,20 @@ flutter324.buildFlutterApplication rec {
  ];

  nativeBuildInputs = [
    pkg-config
    autoPatchelfHook
    wrapGAppsHook3
    copyDesktopItems
  ];

  buildInputs = [
    mpv
    libass
    ffmpeg
    libplacebo
    libunwind
    shaderc
    vulkan-loader
    lcms
    libdovi
    libdvdnav
    libdvdread
    mujs
    libbluray
    lua
    rubberband
    libuchardet
    zimg
    alsa-lib
    openal
    pipewire
    libpulseaudio
    libcaca
    libdrm
    libgbm
    libXScrnSaver
    libXpresent
    nv-codec-headers-11
    libva
    libvdpau
  ];

  gitHashes = {
    ns_danmaku = "sha256-OHlKscybKSLS1Jd1S99rCjHMZfuJXjkQB8U2Tx5iWeA=";
    auto_orientation = "sha256-0QOEW8+0PpBIELmzilZ8+z7ozNRxKgI0BzuBS8c1Fng=";
    mime = "sha256-tqFOH85YTyxtp0LbknScx66CvN4SwYKU6YxYQMNeVs4=";
    canvas_danmaku = "sha256-HjTGFdbPeAGuGdgoTbW9q/soYey+DkPKdZrSKloQ6jA=";
    fl_pip = "sha256-vBIxU/FjcGPBpnHP/wZMEI8VX71RWuUi9LQJ89dBnvg=";
    flutter_floating = "sha256-V+RhmCD/Vb/G2Zr8FPgwSzzYlAcJcbqy0sYXyhXRwP8=";
  };

  postInstall = ''
@@ -110,9 +54,11 @@ flutter324.buildFlutterApplication rec {
  '';

  extraWrapProgramArgs = ''
    --prefix LD_LIBRARY_PATH : "$out/app/${pname}/lib"
    --prefix LD_LIBRARY_PATH : $out/app/pilipalax/lib
  '';

  passthru.updateScript = ./update.sh;

  meta = {
    description = "Third-party BiliBili client developed with Flutter";
    homepage = "https://github.com/orz12/PiliPalaX";
+506 −435

File changed.

Preview size limit exceeded, changes collapsed.

+24 −0
Original line number Diff line number Diff line
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=./. -i bash -p curl jq yq nix bash coreutils common-updater-scripts

set -eou pipefail

ROOT="$(dirname "$(readlink -f "$0")")"

latestTag=$(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} -sL https://api.github.com/repos/orz12/PiliPalaX/releases/latest | jq --raw-output .tag_name)
latestVersion=$(echo "$latestTag" | awk -F'+' '{print $1}')
RunNumber=$(echo "$latestTag" | grep -o '[^+]*$')

currentVersion=$(nix-instantiate --eval -E "with import ./. {}; pilipalax.version or (lib.getVersion pilipalax)" | tr -d '"')

if [[ "$currentVersion" == "$latestVersion" ]]; then
    echo "package is up-to-date: $currentVersion"
    exit 0
fi

sed -i "s/\(tag = \"\${version}+\)[0-9]\+/\1${RunNumber}/" "$ROOT/package.nix"

hash=$(nix hash convert --hash-algo sha256 --to sri $(nix-prefetch-url --unpack "https://github.com/orz12/PiliPalaX/archive/refs/tags/${latestTag}.tar.gz"))
update-source-version pilipalax $latestVersion $hash

curl https://raw.githubusercontent.com/orz12/PiliPalaX/${latestTag}/pubspec.lock | yq . >$ROOT/pubspec.lock.json