1 { lib, buildGoModule, fetchFromGitHub, nixosTests }:
4 # The web client verifies, that the server version is a valid datetime string:
5 # https://github.com/minio/minio/blob/3a0e7347cad25c60b2e51ff3194588b34d9e424c/browser/app/js/web.js#L51-L53
8 # versionToTimestamp "2021-04-22T15-44-28Z"
9 # => "2021-04-22T15:44:28Z"
10 versionToTimestamp = version:
12 splitTS = builtins.elemAt (builtins.split "(.*)(T.*)" version) 1;
14 builtins.concatStringsSep "" [ (builtins.elemAt splitTS 0) (builtins.replaceStrings [ "-" ] [ ":" ] (builtins.elemAt splitTS 1)) ];
18 version = "2022-10-24T18-35-07Z";
20 src = fetchFromGitHub {
23 rev = "RELEASE.${version}";
24 sha256 = "sha256-sABNzhyfBNU5pWyE/VWHUzuSyKsx0glj01ectJPakV8=";
27 vendorHash = "sha256-wB3UiuptT6D0CIUlHC1d5k0rjIxNeh5yAWOmYpyLGmA=";
31 subPackages = [ "." ];
37 ldflags = let t = "github.com/minio/minio/cmd"; in [
38 "-s" "-w" "-X ${t}.Version=${versionToTimestamp version}" "-X ${t}.ReleaseTag=RELEASE.${version}" "-X ${t}.CommitID=${src.rev}"
41 passthru.tests.minio = nixosTests.minio;
44 homepage = "https://www.minio.io/";
45 description = "An S3-compatible object storage server";
46 mainProgram = "minio";
47 changelog = "https://github.com/minio/minio/releases/tag/RELEASE.${version}";
48 maintainers = with maintainers; [ eelco bachp ];
49 license = licenses.agpl3Plus;