Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alist: split versions; 3.39.2 -> 3.40.0 #358658

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions pkgs/by-name/al/alist/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@
lib,
buildGoModule,
fetchFromGitHub,
fetchurl,
fetchzip,
fuse,
stdenv,
installShellFiles,
versionCheckHook,
}:
buildGoModule rec {
pname = "alist";
version = "3.39.2";
version = "3.40.0";
webVersion = "3.39.2";

src = fetchFromGitHub {
owner = "AlistGo";
repo = "alist";
rev = "refs/tags/v${version}";
hash = "sha256-ayIbmoemaDKZu+jYJ33GXq5XORNn6rJ3yOpDgFeXA/4=";
hash = "sha256-2cpYe00OoTLvbN2BeB50wiAcfrrXCp3DXb5xCZaVMPA=";
# 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;
Expand All @@ -28,9 +29,9 @@ buildGoModule rec {
find "$out" -name .git -print0 | xargs -0 rm -rf
'';
};
web = fetchurl {
url = "https://github.com/AlistGo/alist-web/releases/download/${version}/dist.tar.gz";
hash = "sha256-2ZgxWv9VROfXJIIU0Co7BKkjZr8KxQ+0eRsjgz6LVDo=";
web = fetchzip {
url = "https://github.com/AlistGo/alist-web/releases/download/${webVersion}/dist.tar.gz";
hash = "sha256-vc/pwu6TohHVydhMJ5xOXPLogV0WodT/YnGIXtIsLlk=";
};

proxyVendor = true;
Expand All @@ -45,14 +46,12 @@ buildGoModule rec {
"-w"
"-X \"github.com/alist-org/alist/v3/internal/conf.GitAuthor=Xhofe <[email protected]>\""
"-X github.com/alist-org/alist/v3/internal/conf.Version=${version}"
"-X github.com/alist-org/alist/v3/internal/conf.WebVersion=${version}"
"-X github.com/alist-org/alist/v3/internal/conf.WebVersion=${webVersion}"
];

preConfigure = ''
# use matched web files
rm -rf public/dist
tar -xzf ${web}
mv -f dist public
cp -r ${web} public/dist
'';

preBuild = ''
Expand Down