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 {
|
buildGoPackage rec {
|
||||||
name = "minio-client-${shortVersion}";
|
name = "minio-client-${version}";
|
||||||
|
|
||||||
shortVersion = "20170206";
|
version = "2018-02-09T23-07-36Z";
|
||||||
longVersion = "2017-02-06T20-16-19Z";
|
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitHub {
|
||||||
url = "https://github.com/minio/mc/archive/RELEASE.${lib.replaceStrings [":"] ["-"] longVersion}.tar.gz";
|
owner = "minio";
|
||||||
sha256 = "0k66kr7x669jvydcxp3rpvg8p9knhmcihpnjiqynhqgrdy16mr1f";
|
repo = "mc";
|
||||||
|
rev = "RELEASE.${version}";
|
||||||
|
sha256 = "1mzjqcvl8740jkkrsyycwqminnd0vdl1m2mvq8hnywj8hs816bfd";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ go ];
|
goPackagePath = "github.com/minio/mc";
|
||||||
|
|
||||||
unpackPhase = ''
|
buildFlagsArray = [''-ldflags=
|
||||||
d=$TMPDIR/src/github.com/minio/mc
|
-X github.com/minio/mc/cmd.Version=${version}
|
||||||
mkdir -p $d
|
''];
|
||||||
tar xf $src -C $d --strip-component 1
|
|
||||||
export GOPATH=$TMPDIR
|
|
||||||
cd $d
|
|
||||||
'';
|
|
||||||
|
|
||||||
buildPhase = ''
|
meta = with stdenv.lib; {
|
||||||
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 = {
|
|
||||||
homepage = https://github.com/minio/mc;
|
homepage = https://github.com/minio/mc;
|
||||||
description = "A replacement for ls, cp, mkdir, diff and rsync commands for filesystems and object storage";
|
description = "A replacement for ls, cp, mkdir, diff and rsync commands for filesystems and object storage";
|
||||||
maintainers = [ lib.maintainers.eelco ];
|
maintainers = with maintainers; [ eelco bachp ];
|
||||||
platforms = lib.platforms.linux;
|
platforms = platforms.linux;
|
||||||
license = lib.licenses.asl20;
|
license = licenses.asl20;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue