2016-09-07 16:22:02 +01:00
|
|
|
{ lib, stdenv, fetchurl, go }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-10-01 19:58:28 +01:00
|
|
|
name = "minio-${version}";
|
2016-09-07 16:22:02 +01:00
|
|
|
|
2017-10-01 19:58:28 +01:00
|
|
|
version = "2017-09-29T19-16-56Z";
|
2016-09-07 16:22:02 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-10-01 19:58:28 +01:00
|
|
|
url = "https://github.com/minio/minio/archive/RELEASE.${version}.tar.gz";
|
|
|
|
sha256 = "1h028gyfvyh5x6k4fsj4s64sgzqy7jgln6kvs27bnxzigj6dp2wx";
|
2016-09-07 16:22:02 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ go ];
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
d=$TMPDIR/src/github.com/minio/minio
|
|
|
|
mkdir -p $d
|
|
|
|
tar xf $src -C $d --strip-component 1
|
|
|
|
export GOPATH=$TMPDIR
|
|
|
|
cd $d
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
go build -o $out/bin/minio \
|
2017-10-01 19:58:28 +01:00
|
|
|
--ldflags "-X github.com/minio/minio/cmd.Version=${version}"
|
2016-09-07 16:22:02 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = "true";
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = https://www.minio.io/;
|
|
|
|
description = "An S3-compatible object storage server";
|
2017-10-01 19:58:28 +01:00
|
|
|
maintainers = with lib.maintainers; [ eelco bachp ];
|
2016-12-05 18:48:33 +00:00
|
|
|
platforms = lib.platforms.x86_64;
|
2016-09-07 16:22:02 +01:00
|
|
|
license = lib.licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|