mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 13:57:10 +03:00
Port etcd to buildGoPackage
This commit is contained in:
parent
1c98fc7a9a
commit
a20460462d
@ -1,26 +1,21 @@
|
||||
{ stdenv, lib, go, fetchurl, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
|
||||
{ lib, goPackages, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "2.0.0-rc.1";
|
||||
with goPackages;
|
||||
|
||||
buildGoPackage rec {
|
||||
version = "2.0.0";
|
||||
name = "etcd-${version}";
|
||||
|
||||
src = import ./deps.nix {
|
||||
inherit stdenv lib fetchFromGitHub;
|
||||
goPackagePath = "github.com/coreos/etcd";
|
||||
src = fetchFromGitHub {
|
||||
owner = "coreos";
|
||||
repo = "etcd";
|
||||
rev = "v${version}";
|
||||
sha256 = "1s3jilzlqyh2i81pv79cgap6dfj7qrfrwcv4w9lic5ivznz413vc";
|
||||
};
|
||||
|
||||
buildInputs = [ go ];
|
||||
subPackages = [ "./" ];
|
||||
|
||||
buildPhase = ''
|
||||
export GOPATH=$src
|
||||
go build -v -o etcd github.com/coreos/etcd
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
mv etcd $out/bin/etcd
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A highly-available key value store for shared configuration and service discovery";
|
||||
homepage = http://coreos.com/using-coreos/etcd/;
|
||||
license = licenses.asl20;
|
||||
|
@ -1,28 +0,0 @@
|
||||
# This file was generated by go2nix.
|
||||
{ stdenv, lib, fetchFromGitHub }:
|
||||
|
||||
let
|
||||
goDeps = [
|
||||
{
|
||||
root = "github.com/coreos/etcd";
|
||||
src = fetchFromGitHub {
|
||||
owner = "coreos";
|
||||
repo = "etcd";
|
||||
rev = "221abdcb3b755b36d1e7d70149f6de3450351619";
|
||||
sha256 = "1wkd238ap9gp5irrb3f6nnh83rzizwfrfac76j0dvqdka35l247k";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "go-deps";
|
||||
|
||||
buildCommand =
|
||||
lib.concatStrings
|
||||
(map (dep: ''
|
||||
mkdir -p $out/src/`dirname ${dep.root}`
|
||||
ln -s ${dep.src} $out/src/${dep.root}
|
||||
'') goDeps);
|
||||
}
|
Loading…
Reference in New Issue
Block a user