From 363e576b73cbe5a81d5a2b987bcc46ebe70cf353 Mon Sep 17 00:00:00 2001 From: cookieidea Date: Sun, 13 Sep 2026 08:58:07 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20flake=20=E6=8C=87=E5=90=91=20v2.3=20?= =?UTF-8?q?=E4=B8=BB=E4=BB=93=E5=BA=93=20release=EF=BC=88bestdownload=20?= =?UTF-8?q?=E4=BB=93=E5=BA=93=20v2.2+=20=E6=9C=AA=E4=BC=A0=E5=8C=85?= =?UTF-8?q?=EF=BC=89=EF=BC=9B=E9=80=82=E9=85=8D=E6=96=B0=20tar=20=E9=A1=B6?= =?UTF-8?q?=E5=B1=82=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flake.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index d7852b5814..8b178a4a80 100644 --- a/flake.nix +++ b/flake.nix @@ -10,11 +10,11 @@ in { packages.${system}.default = pkgs.stdenv.mkDerivation { pname = "bestclient"; - version = "1.5"; + version = "2.3"; src = pkgs.fetchurl { - url = "https://github.com/RoflikBEST/bestdownload/releases/download/v1.5/bestclient.tar.xz"; - hash = "sha256-fDjtdj6mC76IXJLul0wfj7+7GETU/vveJ8G6S4LskLk"; + url = "https://github.com/BestProjectTeam/BestClient/releases/download/v2.3/BestClient-linux.tar.xz"; + hash = "sha256-ngp73/RXIY1nCky3hhrTN+gRlBJVyw9TJJAMNTjpy6o="; }; nativeBuildInputs = [ @@ -33,6 +33,8 @@ pkgs.libnotify ]; + sourceRoot = "bestclient-2.3-linux_x86_64"; + installPhase = '' mkdir -p $out/bin $out/share/applications cp -r . $out/ From 0bb570395afd1c02c4bd82732e1068badba60525 Mon Sep 17 00:00:00 2001 From: cookieidea Date: Sun, 13 Sep 2026 09:35:21 +0800 Subject: [PATCH 2/3] chore: update flake.lock (nixpkgs 2026-09-11) --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index dfdfdf98b6..7794f1a5cb 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1776548001, - "narHash": "sha256-ZSK0NL4a1BwVbbTBoSnWgbJy9HeZFXLYQizjb2DPF24=", + "lastModified": 1789149629, + "narHash": "sha256-H6GwaZzZf+4npqv0tph94w9tZddSjFjmQrVsW0z78uk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b12141ef619e0a9c1c84dc8c684040326f27cdcc", + "rev": "eaad089433ca2bb662274377d33df3d0e51ef28b", "type": "github" }, "original": { From 6de925247cebe66896e71bf9fe037d4543360ce9 Mon Sep 17 00:00:00 2001 From: cookieidea Date: Mon, 14 Sep 2026 07:06:13 +0800 Subject: [PATCH 3/3] Make the version non-hardcoded Derive src URL and sourceRoot from `version` via a recursive attrset, so bumping only touches `version` (the src hash still has to be pinned manually, as Nix fixed-output derivations require). --- flake.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 8b178a4a80..b1d75162ec 100644 --- a/flake.nix +++ b/flake.nix @@ -8,12 +8,12 @@ system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; in { - packages.${system}.default = pkgs.stdenv.mkDerivation { + packages.${system}.default = pkgs.stdenv.mkDerivation rec { pname = "bestclient"; version = "2.3"; src = pkgs.fetchurl { - url = "https://github.com/BestProjectTeam/BestClient/releases/download/v2.3/BestClient-linux.tar.xz"; + url = "https://github.com/BestProjectTeam/BestClient/releases/download/v${version}/BestClient-linux.tar.xz"; hash = "sha256-ngp73/RXIY1nCky3hhrTN+gRlBJVyw9TJJAMNTjpy6o="; }; @@ -33,7 +33,10 @@ pkgs.libnotify ]; - sourceRoot = "bestclient-2.3-linux_x86_64"; + # Keep URL and sourceRoot derived from `version` so future bumps + # only need to touch `version` (plus the src hash, which Nix requires + # to be pinned and can never be derived). + sourceRoot = "bestclient-${version}-linux_x86_64"; installPhase = '' mkdir -p $out/bin $out/share/applications