nixpkgs/pkgs/tools/networking/minio-client/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
2016-09-07 15:40:29 +00:00
2020-03-09 11:27:51 +00:00
buildGoModule rec {
pname = "minio-client";
version = "2023-08-15T23-03-09Z";
2016-09-07 15:40:29 +00:00
src = fetchFromGitHub {
owner = "minio";
repo = "mc";
rev = "RELEASE.${version}";
sha256 = "sha256-vsCbmT6uWy+VA0qx8x9hx3pDSVKiDeXjnnrFRnhm4C8=";
2016-09-07 15:40:29 +00:00
};
vendorHash = "sha256-xtGXYCmiT7xY9OL8x0tTBP9y8UfzlJ6ZR2DhKOwVgkM=";
2020-03-09 11:27:51 +00:00
subPackages = [ "." ];
2016-09-07 15:40:29 +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
doInstallCheck = true;
installCheckPhase = ''
$out/bin/mc --version | grep ${version} > /dev/null
'';
passthru.tests.minio = nixosTests.minio;
meta = with lib; {
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 ];
mainProgram = "mc";
license = licenses.asl20;
2016-09-07 15:40:29 +00:00
};
}