2022-05-11 21:09:15 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
|
2016-09-07 15:40:29 +00:00
|
|
|
|
2020-03-09 11:27:51 +00:00
|
|
|
buildGoModule rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "minio-client";
|
2023-08-13 22:07:20 +00:00
|
|
|
version = "2023-08-08T17-23-59Z";
|
2016-09-07 15:40:29 +00:00
|
|
|
|
2018-02-13 20:49:30 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "minio";
|
|
|
|
repo = "mc";
|
|
|
|
rev = "RELEASE.${version}";
|
2023-08-13 22:07:20 +00:00
|
|
|
sha256 = "sha256-rXYpAidwwd1sa+22r39VAirVCDdhzFRE5qSQNZf65sg=";
|
2016-09-07 15:40:29 +00:00
|
|
|
};
|
|
|
|
|
2023-08-13 22:07:20 +00:00
|
|
|
vendorHash = "sha256-2zBwqwYyE/9R8Ns5kkvu/JxxYyjnEULBnW+ObYnZ40w=";
|
2020-08-04 00:26:27 +00:00
|
|
|
|
2020-03-09 11:27:51 +00:00
|
|
|
subPackages = [ "." ];
|
2016-09-07 15:40:29 +00:00
|
|
|
|
2020-08-10 20:25:41 +00:00
|
|
|
patchPhase = ''
|
|
|
|
sed -i "s/Version.*/Version = \"${version}\"/g" cmd/build-constants.go
|
|
|
|
sed -i "s/ReleaseTag.*/ReleaseTag = \"RELEASE.${version}\"/g" cmd/build-constants.go
|
|
|
|
sed -i "s/CommitID.*/CommitID = \"${src.rev}\"/g" cmd/build-constants.go
|
|
|
|
'';
|
2016-09-07 15:40:29 +00:00
|
|
|
|
2021-07-21 21:24:51 +00:00
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
$out/bin/mc --version | grep ${version} > /dev/null
|
|
|
|
'';
|
|
|
|
|
2022-05-11 21:09:15 +00:00
|
|
|
passthru.tests.minio = nixosTests.minio;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-05 02:43:38 +00:00
|
|
|
homepage = "https://github.com/minio/mc";
|
2016-09-07 15:40:29 +00:00
|
|
|
description = "A replacement for ls, cp, mkdir, diff and rsync commands for filesystems and object storage";
|
2021-11-03 00:38:27 +00:00
|
|
|
maintainers = with maintainers; [ bachp eelco ];
|
2022-04-01 19:34:55 +00:00
|
|
|
mainProgram = "mc";
|
2018-02-13 20:49:30 +00:00
|
|
|
license = licenses.asl20;
|
2016-09-07 15:40:29 +00:00
|
|
|
};
|
2020-07-31 03:58:04 +00:00
|
|
|
}
|