Unverified Commit 36b0bc05 authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

gopeed: 1.6.8 -> 1.6.10 and fix build (#381451)

parents 9221c9ce 497298a1
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -8,13 +8,13 @@
}:

let
  version = "1.6.8";
  version = "1.6.10";

  src = fetchFromGitHub {
    owner = "GopeedLab";
    repo = "gopeed";
    tag = "v${version}";
    hash = "sha256-Z6t652m420FcCK4V9sG9I+Dzc2OTyXwWunBhVSreyac=";
    hash = "sha256-sTKPSgy1jDavEd/IM8F6dxojp8oOQTo3/w/YV21JR/Q=";
  };

  metaCommon = {
@@ -34,8 +34,9 @@ let
    buildPhase = ''
      runHook preBuild

      mkdir -p $out/lib
      mkdir -p $out/lib $out/bin
      go build -tags nosqlite -ldflags="-w -s -X github.com/GopeedLab/gopeed/pkg/base.Version=v${version}" -buildmode=c-shared -o $out/lib/libgopeed.so github.com/GopeedLab/gopeed/bind/desktop
      go build -ldflags="-w -s" -o $out/bin/host github.com/GopeedLab/gopeed/cmd/host

      runHook postBuild
    '';
@@ -60,6 +61,7 @@ flutter324.buildFlutterApplication {
  preBuild = ''
    mkdir -p linux/bundle/lib
    cp ${libgopeed}/lib/libgopeed.so linux/bundle/lib/libgopeed.so
    cp ${libgopeed}/bin/host assets/host/host
  '';

  postInstall = ''
@@ -68,6 +70,11 @@ flutter324.buildFlutterApplication {
    install -Dm644 assets/icon/icon_1024.png $out/share/icons/hicolor/1024x1024/apps/com.gopeed.Gopeed.png
  '';

  preFixup = ''
    patchelf --add-needed libgopeed.so \
      --add-rpath $out/app/gopeed/lib $out/app/gopeed/gopeed
  '';

  passthru.updateScript = ./update.sh;

  meta = metaCommon // {