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