nixpkgs/pkgs/servers/minio/default.nix

39 lines
901 B
Nix
Raw Normal View History

2016-09-07 18:22:02 +03:00
{ lib, stdenv, fetchurl, go }:
stdenv.mkDerivation rec {
name = "minio-${version}";
2016-09-07 18:22:02 +03:00
version = "2017-09-29T19-16-56Z";
2016-09-07 18:22:02 +03:00
src = fetchurl {
url = "https://github.com/minio/minio/archive/RELEASE.${version}.tar.gz";
sha256 = "1h028gyfvyh5x6k4fsj4s64sgzqy7jgln6kvs27bnxzigj6dp2wx";
2016-09-07 18:22:02 +03: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 \
--ldflags "-X github.com/minio/minio/cmd.Version=${version}"
2016-09-07 18:22:02 +03:00
'';
installPhase = "true";
meta = {
homepage = https://www.minio.io/;
description = "An S3-compatible object storage server";
maintainers = with lib.maintainers; [ eelco bachp ];
2016-12-05 21:48:33 +03:00
platforms = lib.platforms.x86_64;
2016-09-07 18:22:02 +03:00
license = lib.licenses.asl20;
};
}