minio: 2017-09-29T19-16-56Z -> 2018-01-02T23-07-00Z (#33724)

Contains security fixes (see: https://blog.minio.io/minio-release-jan-2nd-2018-security-advisory-ef0342a4ddba)

Use buildGoPackage, otherwise we will have the go build toolchain in our runtime closure.
This commit is contained in:
Pascal Bach 2018-01-12 10:31:58 +01:00 committed by Jörg Thalheim
parent 459e6ba9fb
commit dffe1e569c

View file

@ -1,38 +1,28 @@
{ lib, stdenv, fetchurl, go }:
{ stdenv, buildGoPackage, fetchFromGitHub }:
stdenv.mkDerivation rec {
buildGoPackage rec {
name = "minio-${version}";
version = "2017-09-29T19-16-56Z";
version = "2018-01-02T23-07-00Z";
src = fetchurl {
url = "https://github.com/minio/minio/archive/RELEASE.${version}.tar.gz";
sha256 = "1h028gyfvyh5x6k4fsj4s64sgzqy7jgln6kvs27bnxzigj6dp2wx";
src = fetchFromGitHub {
owner = "minio";
repo = "minio";
rev = "RELEASE.${version}";
sha256 = "1bpiy6q9782mxs5f5lzw6c7zx83s2i68rf5f65xa9z7cyl19si74";
};
buildInputs = [ go ];
goPackagePath = "github.com/minio/minio";
unpackPhase = ''
d=$TMPDIR/src/github.com/minio/minio
mkdir -p $d
tar xf $src -C $d --strip-component 1
export GOPATH=$TMPDIR
cd $d
'';
buildFlagsArray = [''-ldflags=
-X github.com/minio/minio/cmd.Version=${version}
''];
buildPhase = ''
mkdir -p $out/bin
go build -o $out/bin/minio \
--ldflags "-X github.com/minio/minio/cmd.Version=${version}"
'';
installPhase = "true";
meta = {
meta = with stdenv.lib; {
homepage = https://www.minio.io/;
description = "An S3-compatible object storage server";
maintainers = with lib.maintainers; [ eelco bachp ];
platforms = lib.platforms.x86_64;
license = lib.licenses.asl20;
maintainers = with maintainers; [ eelco bachp ];
platforms = platforms.x86_64 ++ ["aarch64-linux"];
license = licenses.asl20;
};
}