1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 22:50:49 +00:00
nixpkgs/pkgs/servers/minio/default.nix

40 lines
966 B
Nix
Raw Normal View History

2016-09-07 16:22:02 +01:00
{ lib, stdenv, fetchurl, go }:
stdenv.mkDerivation rec {
name = "minio-${shortVersion}";
2017-03-28 19:05:10 +01:00
shortVersion = "20170316";
longVersion = "2017-03-16T21-50-32Z";
2016-09-07 16:22:02 +01:00
src = fetchurl {
url = "https://github.com/minio/minio/archive/RELEASE.${lib.replaceStrings [":"] ["-"] longVersion}.tar.gz";
2017-03-28 19:05:10 +01:00
sha256 = "1331lxsfr22x1sh7cyh9xz3aa70715wm1bk1f1r053kyz03q903c";
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 \
--ldflags "-X github.com/minio/minio/cmd.Version=${longVersion}"
'';
installPhase = "true";
meta = {
homepage = https://www.minio.io/;
description = "An S3-compatible object storage server";
maintainers = [ lib.maintainers.eelco ];
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;
};
}