biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / servers / minio / legacy_fs.nix
blob3cf4bed41ebaf0b6456f3f824276b41ecc101e69
1 { lib, buildGoModule, fetchFromGitHub, nixosTests }:
3 let
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
6   #
7   # Example:
8   #   versionToTimestamp "2021-04-22T15-44-28Z"
9   #   => "2021-04-22T15:44:28Z"
10   versionToTimestamp = version:
11     let
12       splitTS = builtins.elemAt (builtins.split "(.*)(T.*)" version) 1;
13     in
14     builtins.concatStringsSep "" [ (builtins.elemAt splitTS 0) (builtins.replaceStrings [ "-" ] [ ":" ] (builtins.elemAt splitTS 1)) ];
16 buildGoModule rec {
17   pname = "minio";
18   version = "2022-10-24T18-35-07Z";
20   src = fetchFromGitHub {
21     owner = "minio";
22     repo = "minio";
23     rev = "RELEASE.${version}";
24     sha256 = "sha256-sABNzhyfBNU5pWyE/VWHUzuSyKsx0glj01ectJPakV8=";
25   };
27   vendorHash = "sha256-wB3UiuptT6D0CIUlHC1d5k0rjIxNeh5yAWOmYpyLGmA=";
29   doCheck = false;
31   subPackages = [ "." ];
33   CGO_ENABLED = 0;
35   tags = [ "kqueue" ];
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}"
39   ];
41   passthru.tests.minio = nixosTests.minio;
43   meta = with lib; {
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;
50   };