Skip to content

Commit

Permalink
minio: 2017-09-29T19-16-56Z -> 2018-01-02T23-07-00Z (#33724)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bachp authored and Mic92 committed Jan 12, 2018
1 parent 459e6ba commit dffe1e5
Showing 1 changed file with 16 additions and 26 deletions.
42 changes: 16 additions & 26 deletions pkgs/servers/minio/default.nix
@@ -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;
};
}

0 comments on commit dffe1e5

Please sign in to comment.