minio-client: 2017-02-06T20-16-19Z -> 2018-02-09T23-07-36Z
The package is reworked to make use of buildGoPackage
This commit is contained in:
parent
6247872c78
commit
dfba6485bb
@ -1,39 +1,28 @@
|
||||
{ lib, stdenv, fetchurl, go }:
|
||||
{ stdenv, buildGoPackage, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "minio-client-${shortVersion}";
|
||||
buildGoPackage rec {
|
||||
name = "minio-client-${version}";
|
||||
|
||||
shortVersion = "20170206";
|
||||
longVersion = "2017-02-06T20-16-19Z";
|
||||
version = "2018-02-09T23-07-36Z";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/minio/mc/archive/RELEASE.${lib.replaceStrings [":"] ["-"] longVersion}.tar.gz";
|
||||
sha256 = "0k66kr7x669jvydcxp3rpvg8p9knhmcihpnjiqynhqgrdy16mr1f";
|
||||
src = fetchFromGitHub {
|
||||
owner = "minio";
|
||||
repo = "mc";
|
||||
rev = "RELEASE.${version}";
|
||||
sha256 = "1mzjqcvl8740jkkrsyycwqminnd0vdl1m2mvq8hnywj8hs816bfd";
|
||||
};
|
||||
|
||||
buildInputs = [ go ];
|
||||
goPackagePath = "github.com/minio/mc";
|
||||
|
||||
unpackPhase = ''
|
||||
d=$TMPDIR/src/github.com/minio/mc
|
||||
mkdir -p $d
|
||||
tar xf $src -C $d --strip-component 1
|
||||
export GOPATH=$TMPDIR
|
||||
cd $d
|
||||
'';
|
||||
buildFlagsArray = [''-ldflags=
|
||||
-X github.com/minio/mc/cmd.Version=${version}
|
||||
''];
|
||||
|
||||
buildPhase = ''
|
||||
mkdir -p $out/bin
|
||||
go build -o $out/bin/minio-client \
|
||||
--ldflags "-X github.com/minio/mc/cmd.Version=${longVersion}"
|
||||
'';
|
||||
|
||||
installPhase = "ln -s minio-client $out/bin/mc";
|
||||
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/minio/mc;
|
||||
description = "A replacement for ls, cp, mkdir, diff and rsync commands for filesystems and object storage";
|
||||
maintainers = [ lib.maintainers.eelco ];
|
||||
platforms = lib.platforms.linux;
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with maintainers; [ eelco bachp ];
|
||||
platforms = platforms.linux;
|
||||
license = licenses.asl20;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user