diff --git a/pkgs/by-name/al/alist/package.nix b/pkgs/by-name/al/alist/package.nix index 15e15148b331..fa227de7d5e2 100644 --- a/pkgs/by-name/al/alist/package.nix +++ b/pkgs/by-name/al/alist/package.nix @@ -9,16 +9,15 @@ versionCheckHook, callPackage, }: -buildGoModule rec { +buildGoModule (finalAttrs: { pname = "alist"; - version = "3.45.0"; - webVersion = "3.45.0"; + version = "3.55.0"; src = fetchFromGitHub { owner = "AlistGo"; repo = "alist"; - tag = "v${version}"; - hash = "sha256-h8oWeTX3z3xye5O4+s7LA7Wm36JOrsU+UdKGZXaDKXk="; + tag = "v${finalAttrs.version}"; + hash = "sha256-/psFL/dCG82y1uWEcg45JG6S7+MD0avqU/HjrR+vklA="; # populate values that require us to use git. By doing this in postFetch we # can delete .git afterwards and maintain better reproducibility of the src. leaveDotGit = true; @@ -30,13 +29,9 @@ buildGoModule rec { find "$out" -name .git -print0 | xargs -0 rm -rf ''; }; - web = fetchzip { - url = "https://github.com/AlistGo/alist-web/releases/download/${webVersion}/dist.tar.gz"; - hash = "sha256-rNVa+dr/SX2aYHBzeV8QdD5XYCFyelhbqkTpvhF+S2g="; - }; proxyVendor = true; - vendorHash = "sha256-IMoLVAgOaVM1xIFDe8BGOpzyBnDMfD9Q6VogFfOWFzU="; + vendorHash = "sha256-aRnS3LLG25FK1ELKd7K1e5aGLmKnQ7w/3QVe4P9RRLI="; buildInputs = [ fuse ]; @@ -46,13 +41,13 @@ buildGoModule rec { "-s" "-w" "-X \"github.com/alist-org/alist/v3/internal/conf.GitAuthor=Xhofe \"" - "-X github.com/alist-org/alist/v3/internal/conf.Version=${version}" - "-X github.com/alist-org/alist/v3/internal/conf.WebVersion=${webVersion}" + "-X github.com/alist-org/alist/v3/internal/conf.Version=${finalAttrs.version}" + "-X github.com/alist-org/alist/v3/internal/conf.WebVersion=${finalAttrs.passthru.webVersion}" ]; preConfigure = '' rm -rf public/dist - cp -r ${web} public/dist + cp -r ${finalAttrs.passthru.web} public/dist ''; preBuild = '' @@ -92,12 +87,17 @@ buildGoModule rec { passthru = { updateScript = lib.getExe (callPackage ./update.nix { }); + webVersion = "3.55.0"; + web = fetchzip { + url = "https://github.com/AlistGo/alist-web/releases/download/${finalAttrs.passthru.webVersion}/dist.tar.gz"; + hash = "sha256-v0o4G2mzd63sShJZRjijIFAUB+ocvF4jspxf841lZ8U="; + }; }; meta = { description = "File list/WebDAV program that supports multiple storages"; homepage = "https://github.com/alist-org/alist"; - changelog = "https://github.com/alist-org/alist/releases/tag/v${version}"; + changelog = "https://github.com/alist-org/alist/releases/tag/v${finalAttrs.version}"; license = with lib.licenses; [ agpl3Only # alist-web @@ -115,4 +115,4 @@ buildGoModule rec { ]; mainProgram = "alist"; }; -} +})