mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 14:22:50 +03:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
bf60088196
31
pkgs/applications/misc/camlistore/default.nix
Normal file
31
pkgs/applications/misc/camlistore/default.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{ stdenv, lib, go, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.7";
|
||||
name = "camlistore-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/bradfitz/camlistore/archive/0.7.tar.gz";
|
||||
sha256 = "0lc35x2b9llrnma0m5czivly0c3l4lh3ldw9hwn83lkh8n0bzn11";
|
||||
};
|
||||
|
||||
buildInputs = [ go ];
|
||||
|
||||
buildPhase = ''
|
||||
go run make.go
|
||||
rm bin/README
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
ensureDir $out/bin
|
||||
cp bin/* $out/bin
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Camlistore is a way of storing, syncing, sharing, modelling and backing up content";
|
||||
homepage = https://camlistore.org;
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ cstrahan ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
@ -217,7 +217,9 @@ clone_user_rev() {
|
||||
fi;;
|
||||
esac
|
||||
|
||||
echo "git revision is $(cd $dir && (git rev-parse $rev 2> /dev/null || git rev-parse refs/heads/fetchgit) | tail -n1)"
|
||||
local full_revision=$(cd $dir && (git rev-parse $rev 2> /dev/null || git rev-parse refs/heads/fetchgit) | tail -n1)
|
||||
echo "git revision is $full_revision"
|
||||
echo "git human-readable version is $(cd $dir && (git describe $full_revision 2> /dev/null || git describe --tags $full_revision 2> /dev/null || echo -- none --))"
|
||||
|
||||
# Allow doing additional processing before .git removal
|
||||
eval "$NIX_PREFETCH_GIT_CHECKOUT_HOOK"
|
||||
|
153
pkgs/build-support/fetchzip/nix-prefetch-zip
Executable file
153
pkgs/build-support/fetchzip/nix-prefetch-zip
Executable file
@ -0,0 +1,153 @@
|
||||
#! /bin/sh -e
|
||||
|
||||
usage(){
|
||||
echo >&2 "syntax: nix-prefetch-zip [OPTIONS] [URL [EXPECTED-HASH]]
|
||||
|
||||
Options:
|
||||
--url url The url of the archive to fetch.
|
||||
--name name The name to use for the store path (defaults to \`basename \$url\`).
|
||||
--hash hash The hash of unpacked archive.
|
||||
--hash-type type Use the specified cryptographic hash algorithm, which can be one of md5, sha1, and sha256.
|
||||
--leave-root Keep the root directory of the archive.
|
||||
--help Show this help text.
|
||||
"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
argi=0
|
||||
argfun=""
|
||||
for arg; do
|
||||
if test -z "$argfun"; then
|
||||
case $arg in
|
||||
--url) argfun=set_url;;
|
||||
--name) argfun=set_name;;
|
||||
--hash) argfun=set_expHash;;
|
||||
--hash-type) argfun=set_hashType;;
|
||||
--leave-root) leaveRoot=true;;
|
||||
--help) usage;;
|
||||
*) argi=$(($argi + 1))
|
||||
case $argi in
|
||||
1) url=$arg;;
|
||||
2) rev=$arg;;
|
||||
3) expHash=$arg;;
|
||||
*) echo "Unexpected argument: $arg" >&2
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
else
|
||||
case $argfun in
|
||||
set_*)
|
||||
var=$(echo $argfun | sed 's,^set_,,')
|
||||
eval "$var=\$arg"
|
||||
;;
|
||||
esac
|
||||
argfun=""
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$url" ]; then
|
||||
echo "Error: No --url flag given" >&2
|
||||
usage
|
||||
fi
|
||||
|
||||
if [ -z "$name" ]; then
|
||||
name=$(basename "$url")
|
||||
fi
|
||||
|
||||
if test -z "$hashType"; then
|
||||
hashType=sha256
|
||||
fi
|
||||
|
||||
hashFormat="--base32"
|
||||
|
||||
tmp=$(mktemp -d 2>/dev/null || mktemp -d -t "$$")
|
||||
trap "rm -rf '$tmp'" EXIT
|
||||
|
||||
unpackDir=$tmp/unpacked/$name
|
||||
mkdir -p $unpackDir
|
||||
downloadedFile=$tmp/$name
|
||||
|
||||
unpackFile() {
|
||||
local curSrc="$1"
|
||||
|
||||
case "$curSrc" in
|
||||
*.tar.xz | *.tar.lzma)
|
||||
# Don't rely on tar knowing about .xz.
|
||||
xz -d < $curSrc | tar xf -
|
||||
;;
|
||||
*.tar | *.tar.* | *.tgz | *.tbz2)
|
||||
# GNU tar can automatically select the decompression method
|
||||
# (info "(tar) gzip").
|
||||
tar xf $curSrc
|
||||
;;
|
||||
*.zip)
|
||||
unzip -qq $curSrc
|
||||
;;
|
||||
*)
|
||||
echo "source archive $curSrc has unknown type" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# If the hash was given, a file with that hash may already be in the
|
||||
# store.
|
||||
if test -n "$expHash"; then
|
||||
finalPath=$(nix-store --print-fixed-path --recursive "$hashType" "$expHash" "$name")
|
||||
if ! nix-store --check-validity "$finalPath" 2> /dev/null; then
|
||||
finalPath=
|
||||
fi
|
||||
hash=$expHash
|
||||
fi
|
||||
|
||||
# If we don't know the hash or a path with that hash doesn't exist,
|
||||
# download the file and add it to the store.
|
||||
if test -z "$finalPath"; then
|
||||
curl="curl \
|
||||
--location --max-redirs 20 \
|
||||
--disable-epsv \
|
||||
--insecure"
|
||||
|
||||
if ! $curl --fail "$url" --output "$downloadedFile"; then
|
||||
echo "error: could not download $url" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd $unpackDir
|
||||
unpackFile "$downloadedFile"
|
||||
|
||||
# FIXME: handle zip files that contain a single regular file.
|
||||
if [ -z "$leaveRoot" ]; then
|
||||
shopt -s dotglob
|
||||
if [ $(ls -d $unpackDir/* | wc -l) != 1 ]; then
|
||||
echo "error: zip file must contain a single directory."
|
||||
exit 1
|
||||
fi
|
||||
fn=$(cd "$unpackDir" && echo *)
|
||||
mv $unpackDir/$fn/* "$unpackDir/"
|
||||
rmdir "$unpackDir/$fn"
|
||||
fi
|
||||
|
||||
# Compute the hash.
|
||||
hash=$(nix-hash --type $hashType $hashFormat $unpackDir)
|
||||
if ! test -n "$QUIET"; then echo "hash is $hash" >&2; fi
|
||||
|
||||
# Add the downloaded file to the Nix store.
|
||||
finalPath=$(nix-store --add-fixed --recursive "$hashType" $unpackDir)
|
||||
|
||||
if test -n "$expHash" -a "$expHash" != "$hash"; then
|
||||
echo "hash mismatch for URL \`$url'"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! test -n "$QUIET"; then echo "path is $finalPath" >&2; fi
|
||||
|
||||
echo $hash
|
||||
|
||||
if test -n "$PRINT_PATH"; then
|
||||
echo $finalPath
|
||||
fi
|
54
pkgs/development/compilers/go/gox.nix
Normal file
54
pkgs/development/compilers/go/gox.nix
Normal file
@ -0,0 +1,54 @@
|
||||
{ stdenv, lib, go, fetchFromGitHub }:
|
||||
|
||||
let
|
||||
goDeps = [
|
||||
{
|
||||
root = "github.com/mitchellh/gox";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mitchellh";
|
||||
repo = "gox";
|
||||
rev = "c7329055e2aeb253a947e5cc876586ff4ca19199";
|
||||
sha256 = "0zhb88jjxqn3sdc4bpzvajqvgi9igp5gk03q12gaksaxhy2wl4jy";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/mitchellh/iochan";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mitchellh";
|
||||
repo = "iochan";
|
||||
rev = "b584a329b193e206025682ae6c10cdbe03b0cd77";
|
||||
sha256 = "1fcwdhfci41ibpng2j4c1bqfng578cwzb3c00yw1lnbwwhaq9r6b";
|
||||
};
|
||||
}
|
||||
];
|
||||
sources = 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);
|
||||
};
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gox";
|
||||
|
||||
src = sources;
|
||||
|
||||
propagatedBuildInputs = [ go ];
|
||||
|
||||
installPhase = ''
|
||||
ensureDir $out/bin
|
||||
export GOPATH=$src
|
||||
go build -v -o $out/bin/gox github.com/mitchellh/gox
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A simple, no-frills tool for Go cross compilation that behaves a lot like standard go build";
|
||||
homepage = https://github.com/mitchellh/gox;
|
||||
maintainers = with maintainers; [ cstrahan ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
30
pkgs/development/tools/etcdctl/default.nix
Normal file
30
pkgs/development/tools/etcdctl/default.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{ stdenv, lib, go, fetchurl, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.4.3";
|
||||
name = "etcdctl-${version}";
|
||||
|
||||
src = import ./deps.nix {
|
||||
inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub;
|
||||
};
|
||||
|
||||
buildInputs = [ go ];
|
||||
|
||||
buildPhase = ''
|
||||
export GOPATH=$src
|
||||
go build -v -o etcdctl github.com/coreos/etcdctl
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
ensureDir $out/bin
|
||||
mv etcdctl $out/bin
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A simple command line client for etcd";
|
||||
homepage = http://coreos.com/using-coreos/etcd/;
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ cstrahan ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
27
pkgs/development/tools/etcdctl/deps.nix
Normal file
27
pkgs/development/tools/etcdctl/deps.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{ stdenv, lib, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
|
||||
|
||||
let
|
||||
goDeps = [
|
||||
{
|
||||
root = "github.com/coreos/etcdctl";
|
||||
src = fetchFromGitHub {
|
||||
owner = "coreos";
|
||||
repo = "etcdctl";
|
||||
rev = "061135b2a02797a6b3c2b6c01183517c1bc76a2c";
|
||||
sha256 = "1hl9cz9ygr2k4d67qj9q1xj0n64b28qjy5sv7zylgg9h9ag2j2p4";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
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);
|
||||
}
|
29
pkgs/development/tools/gocode/default.nix
Normal file
29
pkgs/development/tools/gocode/default.nix
Normal file
@ -0,0 +1,29 @@
|
||||
{ stdenv, lib, go, fetchurl, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gocode";
|
||||
|
||||
src = import ./deps.nix {
|
||||
inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub;
|
||||
};
|
||||
|
||||
buildInputs = [ go ];
|
||||
|
||||
buildPhase = ''
|
||||
export GOPATH=$src
|
||||
go build -v -o gocode github.com/nsf/gocode
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
ensureDir $out/bin
|
||||
mv gocode $out/bin
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "An autocompletion daemon for the Go programming language";
|
||||
homepage = https://github.com/nsf/gocode;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ cstrahan ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
27
pkgs/development/tools/gocode/deps.nix
Normal file
27
pkgs/development/tools/gocode/deps.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{ stdenv, lib, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
|
||||
|
||||
let
|
||||
goDeps = [
|
||||
{
|
||||
root = "github.com/nsf/gocode";
|
||||
src = fetchFromGitHub {
|
||||
owner = "nsf";
|
||||
repo = "gocode";
|
||||
rev = "9b760fdb16f18eafbe0cd274527efd2bd89dfa78";
|
||||
sha256 = "0d1wl0x8jkaav6lcfzs70cr6gy0p88cbk5n3p19l6d0h9xz464ax";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
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);
|
||||
}
|
35
pkgs/development/tools/packer/default.nix
Normal file
35
pkgs/development/tools/packer/default.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{ stdenv, lib, gox, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "packer-0.6.0";
|
||||
|
||||
src = import ./deps.nix {
|
||||
inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub;
|
||||
};
|
||||
|
||||
buildInputs = [ gox ];
|
||||
|
||||
installPhase = ''
|
||||
export GOPATH=$src
|
||||
XC_ARCH=$(go env GOARCH)
|
||||
XC_OS=$(go env GOOS)
|
||||
|
||||
ensureDir $out/bin
|
||||
|
||||
cd $src/src/github.com/mitchellh/packer
|
||||
gox \
|
||||
-os="''${XC_OS}" \
|
||||
-arch="''${XC_ARCH}" \
|
||||
-output "$out/bin/packer-{{.Dir}}" \
|
||||
./...
|
||||
mv $out/bin/packer{*packer*,}
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A tool for creating identical machine images for multiple platforms from a single source configuration";
|
||||
homepage = "http://www.packer.io";
|
||||
license = licenses.mpl20;
|
||||
maintainers = with maintainers; [ cstrahan ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
307
pkgs/development/tools/packer/deps.nix
Normal file
307
pkgs/development/tools/packer/deps.nix
Normal file
@ -0,0 +1,307 @@
|
||||
{ stdenv, lib, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
|
||||
|
||||
let
|
||||
goDeps = [
|
||||
{
|
||||
root = "github.com/mitchellh/packer";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mitchellh";
|
||||
repo = "packer";
|
||||
rev = "12e28f257f66299e3bb13a053bf06ccd236e7efd";
|
||||
sha256 = "1r5j864kr7lx137c23kk5s82znk11hsrgq98zfz5r8sbzq1xpbzw";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "code.google.com/p/go.crypto";
|
||||
src = fetchhg {
|
||||
url = "http://code.google.com/p/go.crypto";
|
||||
tag = "199";
|
||||
sha256 = "0ibrpc6kknzl6a2g2fkxn03mvrd635lcnvf4a9rk1dfrpjbpcixh";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "code.google.com/p/goauth2";
|
||||
src = fetchhg {
|
||||
url = "http://code.google.com/p/goauth2";
|
||||
tag = "67";
|
||||
sha256 = "053vajj8hd9869by7z9qfgzn84h6avpcjvyxcyw5jml8dsln4bah";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "code.google.com/p/google-api-go-client";
|
||||
src = fetchhg {
|
||||
url = "http://code.google.com/p/google-api-go-client";
|
||||
tag = "111";
|
||||
sha256 = "1ib8i1c2mb86lkrr5w7bgwb70gkqmp860wa3h1j8080gxdx3yy16";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "code.google.com/p/gosshold";
|
||||
src = fetchhg {
|
||||
url = "http://code.google.com/p/gosshold";
|
||||
tag = "2";
|
||||
sha256 = "1ljl8pcxxfz5rv89b2ajd31gxxzifl57kzpksvdhyjdxh98gkvg8";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/ActiveState/tail";
|
||||
src = fetchFromGitHub {
|
||||
owner = "ActiveState";
|
||||
repo = "tail";
|
||||
rev = "8dcd1ad3e57aa8ce5614a837cbbdb21945fbb55a";
|
||||
sha256 = "1jxj576dd7mawawwg5nzwf6k7sks0r3lp2x8f6kxaps50n3k1wiz";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/howeyc/fsnotify";
|
||||
src = fetchFromGitHub {
|
||||
owner = "howeyc";
|
||||
repo = "fsnotify";
|
||||
rev = "441bbc86b167f3c1f4786afae9931403b99fdacf";
|
||||
sha256 = "1v5vrwhmidxjj6sppinyizf85v60zrmn7i6c9xk0pvx6k0kw2mr2";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "launchpad.net/tomb";
|
||||
src = fetchbzr {
|
||||
url = "https://launchpad.net/tomb";
|
||||
revision = "17";
|
||||
sha256 = "1cjw0sr9hald1darq6n8akfpkzcgrk3mcq59hga3ibf2lrg35ha0";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/going/toolkit";
|
||||
src = fetchFromGitHub {
|
||||
owner = "going";
|
||||
repo = "toolkit";
|
||||
rev = "6185c1893604d52d36a97dd6bb1247ace93a9b80";
|
||||
sha256 = "1kzy5yppalcidsmv5yxmr6lpqplqj07kdqpn77fdp6fbb0y0sg11";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "code.google.com/p/goprotobuf";
|
||||
src = fetchhg {
|
||||
url = "http://code.google.com/p/goprotobuf";
|
||||
tag = "246";
|
||||
sha256 = "0k4wcv1dnkwcp0gdrajj6kr25f1lg4lgpbi0h5v9l9n7sdwzplf4";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/bmizerany/assert";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bmizerany";
|
||||
repo = "assert";
|
||||
rev = "e17e99893cb6509f428e1728281c2ad60a6b31e3";
|
||||
sha256 = "1lfrvqqmb09y6pcr76yjv4r84cshkd4s7fpmiy7268kfi2cvqnpc";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/kr/pretty";
|
||||
src = fetchFromGitHub {
|
||||
owner = "kr";
|
||||
repo = "pretty";
|
||||
rev = "bc9499caa0f45ee5edb2f0209fbd61fbf3d9018f";
|
||||
sha256 = "1m61y592qsnwsqn76v54mm6h2pcvh4wlzbzscc1ag645x0j33vvl";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/kr/text";
|
||||
src = fetchFromGitHub {
|
||||
owner = "kr";
|
||||
repo = "text";
|
||||
rev = "6807e777504f54ad073ecef66747de158294b639";
|
||||
sha256 = "1wkszsg08zar3wgspl9sc8bdsngiwdqmg3ws4y0bh02sjx5a4698";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/kr/pty";
|
||||
src = fetchFromGitHub {
|
||||
owner = "kr";
|
||||
repo = "pty";
|
||||
rev = "67e2db24c831afa6c64fc17b4a143390674365ef";
|
||||
sha256 = "1l3z3wbb112ar9br44m8g838z0pq2gfxcp5s3ka0xvm1hjvanw2d";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/xiocode/toolkit";
|
||||
src = fetchFromGitHub {
|
||||
owner = "xiocode";
|
||||
repo = "toolkit";
|
||||
rev = "352fd7c6700074a81056cdfc9e82b3e8c5681ac5";
|
||||
sha256 = "0p33zh57xpxyk2wyp9xahdxyrkq48ysihpr0n9kj713q0dh7x4a3";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "launchpad.net/gocheck";
|
||||
src = fetchbzr {
|
||||
url = "https://launchpad.net/gocheck";
|
||||
revision = "87";
|
||||
sha256 = "1y9fa2mv61if51gpik9isls48idsdz87zkm1p3my7swjdix7fcl0";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/hashicorp/go-version";
|
||||
src = fetchFromGitHub {
|
||||
owner = "hashicorp";
|
||||
repo = "go-version";
|
||||
rev = "bb92dddfa9792e738a631f04ada52858a139bcf7";
|
||||
sha256 = "0fl5a6j6nk1xsxwjdpa24a24fxvgnvm3jjlgpyrnmbdn380zil3m";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/mitchellh/go-fs";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mitchellh";
|
||||
repo = "go-fs";
|
||||
rev = "faaa223588dd7005e49bf66fa2d19e35c8c4d761";
|
||||
sha256 = "19jsvy35g14f18ckymzxasy0zfd6n99zlqg6grpj1yqdfxfvqn9b";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/mitchellh/go-vnc";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mitchellh";
|
||||
repo = "go-vnc";
|
||||
rev = "fc93dd80f5da4ccde0a9d97f0c73e56e04e0cf72";
|
||||
sha256 = "03rwsp1frvfx6c7yxr711lq7jdgsr1gcwg14jw26xvbzzxwjvnsf";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/mitchellh/goamz";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mitchellh";
|
||||
repo = "goamz";
|
||||
rev = "c3ff5f734c89f1ea1f290c6aadbbceeeb19a623c";
|
||||
sha256 = "1nyi1p5yh21r161icnwkcgmj2y38b4m1jis47vvjbqinrp45w1gq";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/motain/gocheck";
|
||||
src = fetchFromGitHub {
|
||||
owner = "motain";
|
||||
repo = "gocheck";
|
||||
rev = "9beb271d26e640863a5bf4a3c5ea40ccdd466b84";
|
||||
sha256 = "07arpwfdb51b5f7kzqnm5s5ndfmxv5j793hpn30nbdcya46diwjd";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/mitchellh/iochan";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mitchellh";
|
||||
repo = "iochan";
|
||||
rev = "b584a329b193e206025682ae6c10cdbe03b0cd77";
|
||||
sha256 = "1fcwdhfci41ibpng2j4c1bqfng578cwzb3c00yw1lnbwwhaq9r6b";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/mitchellh/mapstructure";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mitchellh";
|
||||
repo = "mapstructure";
|
||||
rev = "743fcf103ac7cdbc159e540d9d0e3a7889b87d68";
|
||||
sha256 = "1qqxsnxabd7c04n0ip1wmpr2g913qchqrbmblq0shrf5p1hnszgn";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/mitchellh/multistep";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mitchellh";
|
||||
repo = "multistep";
|
||||
rev = "162146fc57112954184d90266f4733e900ed05a5";
|
||||
sha256 = "0ydhbxziy9204qr43pjdh88y2jg34g2mhzdapjyfpf8a1rin6dn3";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/mitchellh/osext";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mitchellh";
|
||||
repo = "osext";
|
||||
rev = "0dd3f918b21bec95ace9dc86c7e70266cfc5c702";
|
||||
sha256 = "02pczqml6p1mnfdrygm3rs02g0r65qx8v1bi3x24dx8wv9dr5y23";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/mitchellh/panicwrap";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mitchellh";
|
||||
repo = "panicwrap";
|
||||
rev = "1aedff2aaa8b8ff7f65ab58e94ef9f593e2e3bf4";
|
||||
sha256 = "05brbpc7kizzbs1a128fmjddh7rdyg0jzzxgbvrl58cgklh4yzaa";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/rackspace/gophercloud";
|
||||
src = fetchFromGitHub {
|
||||
owner = "rackspace";
|
||||
repo = "gophercloud";
|
||||
rev = "2285a429874c1365ef6c6d3ceb08b1d428e26aca";
|
||||
sha256 = "0py3h64r4wkl2r9j7xlh81nazpg2b0r5ba9iblh6d1380yk4fa7f";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/racker/perigee";
|
||||
src = fetchFromGitHub {
|
||||
owner = "racker";
|
||||
repo = "perigee";
|
||||
rev = "01db3191866051f2ec854c2d876ac1a179d3049c";
|
||||
sha256 = "05pmlgwjynbr59bw50zhrklzhr5pgnij9ym5hqvijjrpw3qd9ivf";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/ugorji/go";
|
||||
src = fetchFromGitHub {
|
||||
owner = "ugorji";
|
||||
repo = "go";
|
||||
rev = "71c2886f5a673a35f909803f38ece5810165097b";
|
||||
sha256 = "157f24xnkhclrjwwa1b7lmpj112ynlbf7g1cfw0c657iqny5720j";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/vmihailenco/msgpack";
|
||||
src = fetchFromGitHub {
|
||||
owner = "vmihailenco";
|
||||
repo = "msgpack";
|
||||
rev = "20c1b88a6c7fc5432037439f4e8c582e236fb205";
|
||||
sha256 = "1dj5scpfhgnw0yrh0w6jlrb9d03halvsv4l3wgjhazrrimdqf0q0";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/ugorji/go-msgpack";
|
||||
src = fetchFromGitHub {
|
||||
owner = "ugorji";
|
||||
repo = "go-msgpack";
|
||||
rev = "75092644046c5e38257395b86ed26c702dc95b92";
|
||||
sha256 = "1bmqi16bfiqw7qhb3d5hbh0dfzhx2bbq1g15nh2pxwxckwh80x98";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "launchpad.net/mgo";
|
||||
src = fetchbzr {
|
||||
url = "https://launchpad.net/mgo";
|
||||
revision = "2";
|
||||
sha256 = "0h1dxzyx5c4r4gfnmjxv92hlhjxrgx9p4g53p4fhmz6x2fdglb0x";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/vmihailenco/bufio";
|
||||
src = fetchFromGitHub {
|
||||
owner = "vmihailenco";
|
||||
repo = "bufio";
|
||||
rev = "24e7e48f60fc2d9e99e43c07485d9fff42051e66";
|
||||
sha256 = "0x46qnf2f15v7m0j2dcb16raxjamk5rdc7hqwgyxfr1sqmmw3983";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
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);
|
||||
}
|
@ -2,13 +2,13 @@
|
||||
, cabextract, unzip, p7zip, gnused, gnugrep, bash } :
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
rev = "1083";
|
||||
rev = "1199";
|
||||
name = "winetricks-${rev}";
|
||||
|
||||
src = fetchsvn {
|
||||
url = "http://winetricks.googlecode.com/svn/trunk";
|
||||
inherit rev;
|
||||
sha256 = "0zakwn7g2ni6xw92i1y3pngyaxsr93714s4jy11adf7rxdkj0a32";
|
||||
sha256 = "1kji1n6ps09g8xnl9m7vqk3vkl03abzwnc43c52i8p0adnv06khb";
|
||||
};
|
||||
|
||||
buildInputs = [ perl which ];
|
||||
@ -28,4 +28,3 @@ stdenv.mkDerivation rec {
|
||||
maintainers = with stdenv.lib.maintainers; [ the-kenny ];
|
||||
};
|
||||
}
|
||||
|
||||
|
30
pkgs/servers/etcd/default.nix
Normal file
30
pkgs/servers/etcd/default.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{ stdenv, lib, go, fetchurl, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.4.3";
|
||||
name = "etcd-${version}";
|
||||
|
||||
src = import ./deps.nix {
|
||||
inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub;
|
||||
};
|
||||
|
||||
buildInputs = [ go ];
|
||||
|
||||
buildPhase = ''
|
||||
export GOPATH=$src
|
||||
go build -v -o etcd github.com/coreos/etcd
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
ensureDir $out/bin
|
||||
mv etcd $out/bin/etcd
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A highly-available key value store for shared configuration and service discovery";
|
||||
homepage = http://coreos.com/using-coreos/etcd/;
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ cstrahan ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
54
pkgs/servers/etcd/deps.nix
Normal file
54
pkgs/servers/etcd/deps.nix
Normal file
@ -0,0 +1,54 @@
|
||||
{ stdenv, lib, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
|
||||
|
||||
let
|
||||
goDeps = [
|
||||
{
|
||||
root = "github.com/coreos/etcd";
|
||||
src = fetchFromGitHub {
|
||||
owner = "coreos";
|
||||
repo = "etcd";
|
||||
rev = "9970141f76241c909977af7bafe7b6f2c4923de8";
|
||||
sha256 = "1bva46gfy4rkfw8k8pb3lsfzfg16csds01f0nvfrkh99pr7sp0sy";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/stathat/go";
|
||||
src = fetchFromGitHub {
|
||||
owner = "stathat";
|
||||
repo = "go";
|
||||
rev = "01d012b9ee2ecc107cb28b6dd32d9019ed5c1d77";
|
||||
sha256 = "0mrn70wjfcs4rfkmga3hbfqmbjk33skcsc8pyqxp02bzpwdpc4bi";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/stretchr/objx";
|
||||
src = fetchFromGitHub {
|
||||
owner = "stretchr";
|
||||
repo = "objx";
|
||||
rev = "cbeaeb16a013161a98496fad62933b1d21786672";
|
||||
sha256 = "1xn7iibjik77h6h0jilfvcjkkzaqz45baf44p3rb2i03hbmkqkp1";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/stretchr/testify";
|
||||
src = fetchFromGitHub {
|
||||
owner = "stretchr";
|
||||
repo = "testify";
|
||||
rev = "3e03dde72495487a4deb74152ac205d0619fbc8d";
|
||||
sha256 = "1xd9sbi6y68cfwkxgybcz0dbfx4r6jmxq51wjj6six3wm9p7m8ls";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
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);
|
||||
}
|
30
pkgs/servers/fleet/default.nix
Normal file
30
pkgs/servers/fleet/default.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{ stdenv, lib, go, fetchurl, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.5.0";
|
||||
name = "fleet-${version}";
|
||||
|
||||
src = import ./deps.nix {
|
||||
inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub;
|
||||
};
|
||||
|
||||
buildInputs = [ go ];
|
||||
|
||||
buildPhase = ''
|
||||
export GOPATH=$src
|
||||
go build -v -o fleet github.com/coreos/fleet
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
ensureDir $out/bin
|
||||
mv fleet $out/bin
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A distributed init system";
|
||||
homepage = http://coreos.com/using-coreos/clustering/;
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ cstrahan ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
81
pkgs/servers/fleet/deps.nix
Normal file
81
pkgs/servers/fleet/deps.nix
Normal file
@ -0,0 +1,81 @@
|
||||
{ stdenv, lib, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
|
||||
|
||||
let
|
||||
goDeps = [
|
||||
{
|
||||
root = "code.google.com/p/gogoprotobuf";
|
||||
src = fetchgit {
|
||||
url = "https://code.google.com/p/gogoprotobuf";
|
||||
rev = "7fd1620f09261338b6b1ca1289ace83aee0ec946";
|
||||
sha256 = "0f13y29zpxkv7b7kwnszygvg04fd5m9r8vpkl1wa3gxnc6az54i9";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/coreos/etcd";
|
||||
src = fetchFromGitHub {
|
||||
owner = "coreos";
|
||||
repo = "etcd";
|
||||
rev = "1359d29fa451b059bb76b51260610d92853e7316";
|
||||
sha256 = "0iz3vmf3nfp1i5r8al207wm0jvj68i47a814w90b1jl8g4f2amp7";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/coreos/fleet";
|
||||
src = fetchFromGitHub {
|
||||
owner = "coreos";
|
||||
repo = "fleet";
|
||||
rev = "da0a02ed3b07d83b0b542dcdee56e08d2457ab9c";
|
||||
sha256 = "0b8aq4ppyv1fjvf3f2qjq80mvjvf9r104bf4048wgsrs0pccs6s8";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/coreos/raft";
|
||||
src = fetchFromGitHub {
|
||||
owner = "coreos";
|
||||
repo = "raft";
|
||||
rev = "67dca7288f1665b59860421673d46314f4348e45";
|
||||
sha256 = "1l27kjkwcxgx89d2m537plagbp1wh6qlzxirza6lliblrgxry6mw";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/stathat/go";
|
||||
src = fetchFromGitHub {
|
||||
owner = "stathat";
|
||||
repo = "go";
|
||||
rev = "01d012b9ee2ecc107cb28b6dd32d9019ed5c1d77";
|
||||
sha256 = "0mrn70wjfcs4rfkmga3hbfqmbjk33skcsc8pyqxp02bzpwdpc4bi";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/stretchr/objx";
|
||||
src = fetchFromGitHub {
|
||||
owner = "stretchr";
|
||||
repo = "objx";
|
||||
rev = "cbeaeb16a013161a98496fad62933b1d21786672";
|
||||
sha256 = "1xn7iibjik77h6h0jilfvcjkkzaqz45baf44p3rb2i03hbmkqkp1";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/stretchr/testify";
|
||||
src = fetchFromGitHub {
|
||||
owner = "stretchr";
|
||||
repo = "testify";
|
||||
rev = "3e03dde72495487a4deb74152ac205d0619fbc8d";
|
||||
sha256 = "1xd9sbi6y68cfwkxgybcz0dbfx4r6jmxq51wjj6six3wm9p7m8ls";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
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);
|
||||
}
|
||||
|
37
pkgs/servers/nsq/default.nix
Normal file
37
pkgs/servers/nsq/default.nix
Normal file
@ -0,0 +1,37 @@
|
||||
{ stdenv, lib, go, fetchurl, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.2.28";
|
||||
name = "nsq-${version}";
|
||||
|
||||
src = import ./deps.nix {
|
||||
inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub;
|
||||
};
|
||||
|
||||
buildInputs = [ go ];
|
||||
|
||||
buildPhase = ''
|
||||
export GOPATH=$src
|
||||
apps=(nsq_pubsub nsq_stat nsq_tail nsq_to_file nsq_to_http nsq_to_nsq nsqd nsqlookupd)
|
||||
|
||||
mkdir build
|
||||
|
||||
go build -v -o build/nsqadmin github.com/bitly/nsq/nsqadmin
|
||||
for app in "''${apps[@]}"; do
|
||||
go build -v -o build/$app github.com/bitly/nsq/apps/$app
|
||||
done
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
ensureDir $out/bin
|
||||
mv build/* $out/bin
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A realtime distributed messaging platform";
|
||||
homepage = http://nsq.io/;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ cstrahan ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
134
pkgs/servers/nsq/deps.nix
Normal file
134
pkgs/servers/nsq/deps.nix
Normal file
@ -0,0 +1,134 @@
|
||||
{ stdenv, lib, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
|
||||
|
||||
let
|
||||
goDeps = [
|
||||
{
|
||||
root = "code.google.com/p/snappy-go";
|
||||
src = fetchhg {
|
||||
url = "http://code.google.com/p/snappy-go";
|
||||
tag = "14";
|
||||
sha256 = "0ywa52kcii8g2a9lbqcx8ghdf6y56lqq96sl5nl9p6h74rdvmjr7";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/BurntSushi/toml";
|
||||
src = fetchFromGitHub {
|
||||
owner = "BurntSushi";
|
||||
repo = "toml";
|
||||
rev = "f87ce853111478914f0bcffa34d43a93643e6eda";
|
||||
sha256 = "0g8203y9ycf34j2q3ymxb8nh4habgwdrjn9vdgrginllx73yq565";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/bitly/go-hostpool";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bitly";
|
||||
repo = "go-hostpool";
|
||||
rev = "fed86fae5cacdc77e7399937e2f8836563620a2e";
|
||||
sha256 = "0nbssfp5ksj4hhc0d8lfq54afd9nqv6qzk3vi6rinxr3fgplrj44";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/bitly/go-nsq";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bitly";
|
||||
repo = "go-nsq";
|
||||
rev = "c79a282f05364e340eadc2ce2f862a3d44eea9c0";
|
||||
sha256 = "19jlwj5419p5xwjzfnzlddjnbh5g7ifnqhd00i5p0b6ww1gk011p";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/bitly/go-simplejson";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bitly";
|
||||
repo = "go-simplejson";
|
||||
rev = "1cfceb0e12f47ec02665ef480212d7b531d6f4c5";
|
||||
sha256 = "1d8x0himl58qn87lv418djy6mbs66p9ai3zpqq13nhkfl67fj3bi";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/bitly/nsq";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bitly";
|
||||
repo = "nsq";
|
||||
rev = "048691a8242c9ec224fc46bf7d05f321026b69f8";
|
||||
sha256 = "0drmf1j5w3q4l6f7xjy3y7d7cl50gcx0qwci6mahxsyaaclx60yx";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/bmizerany/assert";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bmizerany";
|
||||
repo = "assert";
|
||||
rev = "e17e99893cb6509f428e1728281c2ad60a6b31e3";
|
||||
sha256 = "1lfrvqqmb09y6pcr76yjv4r84cshkd4s7fpmiy7268kfi2cvqnpc";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/bmizerany/perks";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bmizerany";
|
||||
repo = "perks";
|
||||
rev = "aac9e2eab5a334037057336897fd10b0289a5ae8";
|
||||
sha256 = "1d027jgc327qz5xmal0hrpqvsj45i9yqmm9pxk3xp3hancvz3l3k";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/kr/pretty";
|
||||
src = fetchFromGitHub {
|
||||
owner = "kr";
|
||||
repo = "pretty";
|
||||
rev = "bc9499caa0f45ee5edb2f0209fbd61fbf3d9018f";
|
||||
sha256 = "1m61y592qsnwsqn76v54mm6h2pcvh4wlzbzscc1ag645x0j33vvl";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/kr/pty";
|
||||
src = fetchFromGitHub {
|
||||
owner = "kr";
|
||||
repo = "pty";
|
||||
rev = "67e2db24c831afa6c64fc17b4a143390674365ef";
|
||||
sha256 = "1l3z3wbb112ar9br44m8g838z0pq2gfxcp5s3ka0xvm1hjvanw2d";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/kr/text";
|
||||
src = fetchFromGitHub {
|
||||
owner = "kr";
|
||||
repo = "text";
|
||||
rev = "6807e777504f54ad073ecef66747de158294b639";
|
||||
sha256 = "1wkszsg08zar3wgspl9sc8bdsngiwdqmg3ws4y0bh02sjx5a4698";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/mreiferson/go-options";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mreiferson";
|
||||
repo = "go-options";
|
||||
rev = "896a539cd709f4f39d787562d1583c016ce7517e";
|
||||
sha256 = "0hg0n5grcjcj5719rqchz0plp39wfk3znqxw8y354k4jwsqwmn17";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/mreiferson/go-snappystream";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mreiferson";
|
||||
repo = "go-snappystream";
|
||||
rev = "97c96e6648e99c2ce4fe7d169aa3f7368204e04d";
|
||||
sha256 = "08ylvx9r6b1fi76v6cqjvny4yqsvcqjfsg93jdrgs7hi4mxvxynn";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
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);
|
||||
}
|
@ -1,126 +1,30 @@
|
||||
{ stdenv, fetchurl, fetchgit, fetchhg, go, lib }:
|
||||
{ stdenv, lib, go, fetchurl, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
|
||||
|
||||
let
|
||||
goDeps = [
|
||||
{
|
||||
dir = "github.com/hashicorp";
|
||||
name = "serf";
|
||||
rev = "c5b41a9d1d261135117a8d501d3293efade3cc74";
|
||||
sha256 = "a314d3c13fb370842a8f7c6650abfa907b51172a09c64f9184a240fab05b43df";
|
||||
fetcher = git;
|
||||
}
|
||||
{
|
||||
dir = "github.com/armon";
|
||||
name = "go-metrics";
|
||||
rev = "e12c3591b520e819e8234bd585d592774f2b2ad5";
|
||||
sha256 = "79476efefb68876fcad7e71e76d95f4a7eece2cfcdc5a9c10f998af3178230ba";
|
||||
fetcher = git;
|
||||
}
|
||||
{
|
||||
dir = "github.com/hashicorp";
|
||||
name = "logutils";
|
||||
rev = "8e0820fe7ac5eb2b01626b1d99df47c5449eb2d8";
|
||||
sha256 = "184lnn7x1v3xvj6zz1rg9s0252wkkd59kij2iyrrm7y80bym2jys";
|
||||
fetcher = git;
|
||||
}
|
||||
{
|
||||
dir = "github.com/hashicorp";
|
||||
name = "memberlist";
|
||||
rev = "d5be01d1f4d75b086eba4ae808f2767c08cbbf73";
|
||||
sha256 = "4ab2b610d439e96c169d9caf9ac0e009d71d3ef9a2fd2c812870b71eb6b27dfc";
|
||||
fetcher = git;
|
||||
}
|
||||
{
|
||||
dir = "github.com/ugorji";
|
||||
name = "go";
|
||||
rev = "71c2886f5a673a35f909803f38ece5810165097b";
|
||||
sha256 = "128853bcc5f114c300772cbce316b55e84206fa56705c5b9cc94c1693b11ee94";
|
||||
fetcher = git;
|
||||
}
|
||||
{
|
||||
dir = "github.com/mitchellh";
|
||||
name = "cli";
|
||||
rev = "69f0b65ce53b27f729b1b807b88dc88007f41dd3";
|
||||
sha256 = "0hnnqd8vg5ca2hglkrj141ba2akdh7crl2lsrgz8d6ipw6asszx3";
|
||||
fetcher = git;
|
||||
}
|
||||
{
|
||||
dir = "github.com/armon";
|
||||
name = "mdns";
|
||||
rev = "8be7e3ac4e941555169a99d01abcabd3c982d87a";
|
||||
sha256 = "87cd3a0ada3b094ee8fc4c4742158e0d051cde893da1ea320158a47d6254f69d";
|
||||
fetcher = git;
|
||||
}
|
||||
{
|
||||
dir = "github.com/miekg";
|
||||
name = "dns";
|
||||
rev = "7ebb4c59b39d5984952a355086606dd91f6cfe86";
|
||||
sha256 = "8418ad2d27e607cef1dc0003471416294443e467f2de9df135e3a2ab411e2512";
|
||||
fetcher = git;
|
||||
}
|
||||
{
|
||||
dir = "github.com/mitchellh";
|
||||
name = "mapstructure";
|
||||
rev = "57bb2fa7a7e00b26c80e4c4b0d4f15a210d94039";
|
||||
sha256 = "13lvd5vw8y6h5zl3samkrb7237kk778cky7k7ys1cm46mfd957zy";
|
||||
fetcher = git;
|
||||
}
|
||||
{
|
||||
dir = "github.com/ryanuber";
|
||||
name = "columnize";
|
||||
rev = "d066e113d6e13232f45bda646a915dffeee7f1a4";
|
||||
sha256 = "2aaec396a223fc4b45117a595e74c0a874bd5cd9604c742b8c4747436b4721e9";
|
||||
fetcher = git;
|
||||
}
|
||||
{
|
||||
dir = "code.google.com/p";
|
||||
name = "go.net";
|
||||
rev = "89dbba2db2d4";
|
||||
sha256 = "0168inai10nkdrz4g0rjlj8b5v34mv135v8bhyvh501vnqql50jn";
|
||||
fetcher = hg;
|
||||
}
|
||||
];
|
||||
git = desc: fetchgit { url = "https://${desc.dir}/${desc.name}";
|
||||
inherit (desc) rev sha256; };
|
||||
hg = desc: fetchhg { url = "https://${desc.dir}/${desc.name}";
|
||||
tag = desc.rev;
|
||||
inherit (desc) sha256; };
|
||||
createGoPathCmds =
|
||||
lib.concatStrings
|
||||
(map (desc:
|
||||
let fetched = desc.fetcher desc; in ''
|
||||
mkdir -p $GOPATH/src/${desc.dir}
|
||||
ln -s ${fetched} $GOPATH/src/${desc.dir}/${desc.name}
|
||||
'') goDeps);
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.5.0";
|
||||
name = "serfdom-${version}";
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.6.2";
|
||||
name = "serfdom-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/hashicorp/serf/archive/v${version}.tar.gz";
|
||||
sha256 = "1p2cpkdx0gck1ypxc98im7gsv3275avpkizhsif3nxvl1xd8g1qp";
|
||||
};
|
||||
src = import ./deps.nix {
|
||||
inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub;
|
||||
};
|
||||
|
||||
buildInputs = [ go ];
|
||||
buildInputs = [ go ];
|
||||
|
||||
buildPhase = ''
|
||||
mkdir $TMPDIR/go
|
||||
export GOPATH=$TMPDIR/go
|
||||
${createGoPathCmds}
|
||||
go build -v -o bin/serf
|
||||
'';
|
||||
buildPhase = ''
|
||||
export GOPATH=$src
|
||||
go build -v -o serf github.com/hashicorp/serf
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
ensureDir $out/bin
|
||||
cp bin/serf $out/bin
|
||||
'';
|
||||
installPhase = ''
|
||||
ensureDir $out/bin
|
||||
mv serf $out/bin/serf
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Serf is a service discovery and orchestration tool that is decentralized, highly available, and fault tolerant";
|
||||
homepage = http://www.serfdom.io/;
|
||||
license = licenses.mpl20;
|
||||
maintainers = [ maintainers.msackman ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
meta = with stdenv.lib; {
|
||||
description = "Serf is a service discovery and orchestration tool that is decentralized, highly available, and fault tolerant";
|
||||
homepage = http://www.serfdom.io/;
|
||||
license = licenses.mpl20;
|
||||
maintainers = with maintainers; [ msackman cstrahan ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
185
pkgs/servers/serfdom/deps.nix
Normal file
185
pkgs/servers/serfdom/deps.nix
Normal file
@ -0,0 +1,185 @@
|
||||
{ stdenv, lib, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
|
||||
|
||||
let
|
||||
goDeps = [
|
||||
{
|
||||
root = "code.google.com/p/go.net";
|
||||
src = fetchhg {
|
||||
url = "http://code.google.com/p/go.net";
|
||||
tag = "134";
|
||||
sha256 = "1jycpgrfwgkfac60zjbx6babcz7sgyn9xgy6cr3l811j6k8r2pbv";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "code.google.com/p/go.text";
|
||||
src = fetchhg {
|
||||
url = "http://code.google.com/p/go.text";
|
||||
tag = "85";
|
||||
sha256 = "1x8h6vq9g5gbi7iiwla6dkaaqqf7wmkdm4szj7wvzlsijf2x8dwr";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/armon/circbuf";
|
||||
src = fetchFromGitHub {
|
||||
owner = "armon";
|
||||
repo = "circbuf";
|
||||
rev = "f092b4f207b6e5cce0569056fba9e1a2735cb6cf";
|
||||
sha256 = "06kwwdwa3hskdh6ws7clj1vim80dyc3ldim8k9y5qpd30x0avn5s";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/armon/go-metrics";
|
||||
src = fetchFromGitHub {
|
||||
owner = "armon";
|
||||
repo = "go-metrics";
|
||||
rev = "02567bbc4f518a43853d262b651a3c8257c3f141";
|
||||
sha256 = "08fk3zmw0ywmdfp2qhrpv0vrk1y97hzqczrgr3y2yip3x8sr37ar";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/armon/mdns";
|
||||
src = fetchFromGitHub {
|
||||
owner = "armon";
|
||||
repo = "mdns";
|
||||
rev = "70462deb060d44247356ee238ebafd7699ddcffe";
|
||||
sha256 = "0xkm3d0hsixdm1yrkx9c39723kfjkb3wvrzrmx3np9ylcwn6h5p5";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/hashicorp/go-syslog";
|
||||
src = fetchFromGitHub {
|
||||
owner = "hashicorp";
|
||||
repo = "go-syslog";
|
||||
rev = "ac3963b72ac367e48b1e68a831e62b93fb69091c";
|
||||
sha256 = "1r9s1gsa4azcs05gx1179ixk7qvrkrik3v92wr4s8gwm00m0gf81";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/hashicorp/logutils";
|
||||
src = fetchFromGitHub {
|
||||
owner = "hashicorp";
|
||||
repo = "logutils";
|
||||
rev = "8e0820fe7ac5eb2b01626b1d99df47c5449eb2d8";
|
||||
sha256 = "033rbkc066g657r0dnzysigjz2bs4biiz0kmiypd139d34jvslwz";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/hashicorp/memberlist";
|
||||
src = fetchFromGitHub {
|
||||
owner = "hashicorp";
|
||||
repo = "memberlist";
|
||||
rev = "17d39b695094be943bfb98442a80b082e6b9ac47";
|
||||
sha256 = "0nvgjnwmfqhv2wvr77d2q5mq1bfw4xbpil6wgyj4fyrmhsfzrv3g";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/hashicorp/serf";
|
||||
src = fetchFromGitHub {
|
||||
owner = "hashicorp";
|
||||
repo = "serf";
|
||||
rev = "4232a3f7b52f755084caf6b2cc2789efa2948555";
|
||||
sha256 = "1hxxqrjz08882d205ylakhvvwciahiqdzkwi2a7zwrmx6sxna7sr";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/miekg/dns";
|
||||
src = fetchFromGitHub {
|
||||
owner = "miekg";
|
||||
repo = "dns";
|
||||
rev = "fc67c4b981930a377f8a26a5a1f2c0ccd5dd1514";
|
||||
sha256 = "1csjmkx0gl34r4hmkhdbdxb0693f1p10yrjaj8f2jwli9p9sl4mg";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/mitchellh/cli";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mitchellh";
|
||||
repo = "cli";
|
||||
rev = "8262fe3f76f0da53b5674eb35c8c6436430794c3";
|
||||
sha256 = "0pqkxh1q49kkxihggrfjs8174d927g4c5qqx00ggw8sqqsgrw6vn";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/mitchellh/mapstructure";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mitchellh";
|
||||
repo = "mapstructure";
|
||||
rev = "6fb2c832bcac61d01212ab1d172f7a14a8585b07";
|
||||
sha256 = "0mx855lwhv0rk461wmbnbzbpkhmq5p2ipmrm5bhzimagrr1w17hw";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/ryanuber/columnize";
|
||||
src = fetchFromGitHub {
|
||||
owner = "ryanuber";
|
||||
repo = "columnize";
|
||||
rev = "785d943a7b6886e0bb2f139a60487b823dd8d9de";
|
||||
sha256 = "1h3sxzhiwz65vf3cvclirlf6zhdr97v01dpn5cmf3m09rxxpnp3f";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/ugorji/go";
|
||||
src = fetchFromGitHub {
|
||||
owner = "ugorji";
|
||||
repo = "go";
|
||||
rev = "71c2886f5a673a35f909803f38ece5810165097b";
|
||||
sha256 = "157f24xnkhclrjwwa1b7lmpj112ynlbf7g1cfw0c657iqny5720j";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/ugorji/go-msgpack";
|
||||
src = fetchFromGitHub {
|
||||
owner = "ugorji";
|
||||
repo = "go-msgpack";
|
||||
rev = "75092644046c5e38257395b86ed26c702dc95b92";
|
||||
sha256 = "1bmqi16bfiqw7qhb3d5hbh0dfzhx2bbq1g15nh2pxwxckwh80x98";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/vmihailenco/bufio";
|
||||
src = fetchFromGitHub {
|
||||
owner = "vmihailenco";
|
||||
repo = "bufio";
|
||||
rev = "24e7e48f60fc2d9e99e43c07485d9fff42051e66";
|
||||
sha256 = "0x46qnf2f15v7m0j2dcb16raxjamk5rdc7hqwgyxfr1sqmmw3983";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/vmihailenco/msgpack";
|
||||
src = fetchFromGitHub {
|
||||
owner = "vmihailenco";
|
||||
repo = "msgpack";
|
||||
rev = "20c1b88a6c7fc5432037439f4e8c582e236fb205";
|
||||
sha256 = "1dj5scpfhgnw0yrh0w6jlrb9d03halvsv4l3wgjhazrrimdqf0q0";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "launchpad.net/gocheck";
|
||||
src = fetchbzr {
|
||||
url = "https://launchpad.net/gocheck";
|
||||
revision = "87";
|
||||
sha256 = "1y9fa2mv61if51gpik9isls48idsdz87zkm1p3my7swjdix7fcl0";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "launchpad.net/mgo";
|
||||
src = fetchbzr {
|
||||
url = "https://launchpad.net/mgo";
|
||||
revision = "2";
|
||||
sha256 = "0h1dxzyx5c4r4gfnmjxv92hlhjxrgx9p4g53p4fhmz6x2fdglb0x";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
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);
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, makeWrapper, git, subversion, mercurial, bazaar, cvs }:
|
||||
{ stdenv, makeWrapper, git, subversion, mercurial, bazaar, cvs, unzip, curl, gnused }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "nix-prefetch-scripts";
|
||||
@ -11,9 +11,13 @@ stdenv.mkDerivation {
|
||||
function copyScript {
|
||||
local name=nix-prefetch-$1;
|
||||
local src=$2;
|
||||
local exe=$3/bin;
|
||||
local wrapArgs=""
|
||||
cp $src $out/bin/$name;
|
||||
wrapProgram $out/bin/$name --suffix PATH : "$exe"
|
||||
for dep in ''${@:3}; do
|
||||
wrapArgs="$wrapArgs --prefix PATH : $dep/bin"
|
||||
done
|
||||
wrapArgs="$wrapArgs --prefix PATH : ${gnused}/bin"
|
||||
wrapProgram $out/bin/$name $wrapArgs
|
||||
}
|
||||
|
||||
copyScript "hg" ${../../../build-support/fetchhg/nix-prefetch-hg} ${mercurial}
|
||||
@ -21,6 +25,7 @@ stdenv.mkDerivation {
|
||||
copyScript "svn" ${../../../build-support/fetchsvn/nix-prefetch-svn} ${subversion}
|
||||
copyScript "bzr" ${../../../build-support/fetchbzr/nix-prefetch-bzr} ${bazaar}
|
||||
copyScript "cvs" ${../../../build-support/fetchcvs/nix-prefetch-cvs} ${cvs}
|
||||
copyScript "zip" ${../../../build-support/fetchzip/nix-prefetch-zip} ${unzip} ${curl}
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
@ -30,4 +35,4 @@ stdenv.mkDerivation {
|
||||
# Quicker to build than to download, I hope
|
||||
hydraPlatforms = [];
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -329,6 +329,8 @@ let
|
||||
|
||||
fetchmtn = callPackage ../build-support/fetchmtn (config.fetchmtn or {});
|
||||
|
||||
packer = callPackage ../development/tools/packer { };
|
||||
|
||||
fetchpatch = callPackage ../build-support/fetchpatch { };
|
||||
|
||||
fetchsvn = import ../build-support/fetchsvn {
|
||||
@ -2980,6 +2982,8 @@ let
|
||||
|
||||
go = go_1_3;
|
||||
|
||||
gox = callPackage ../development/compilers/go/gox.nix { };
|
||||
|
||||
gprolog = callPackage ../development/compilers/gprolog { };
|
||||
|
||||
gwt240 = callPackage ../development/compilers/gwt/2.4.0.nix { };
|
||||
@ -6640,12 +6644,16 @@ let
|
||||
|
||||
dovecot_pigeonhole = callPackage ../servers/mail/dovecot-pigeonhole { };
|
||||
|
||||
etcd = callPackage ../servers/etcd { };
|
||||
|
||||
ejabberd = callPackage ../servers/xmpp/ejabberd {
|
||||
erlang = erlangR16;
|
||||
};
|
||||
|
||||
elasticmq = callPackage ../servers/elasticmq { };
|
||||
|
||||
etcdctl = callPackage ../development/tools/etcdctl { };
|
||||
|
||||
fcgiwrap = callPackage ../servers/fcgiwrap { };
|
||||
|
||||
felix = callPackage ../servers/felix { };
|
||||
@ -6657,6 +6665,8 @@ let
|
||||
firebird = callPackage ../servers/firebird { icu = null; };
|
||||
firebirdSuper = callPackage ../servers/firebird { superServer = true; };
|
||||
|
||||
fleet = callPackage ../servers/fleet { };
|
||||
|
||||
freepops = callPackage ../servers/mail/freepops { };
|
||||
|
||||
freeswitch = callPackage ../servers/sip/freeswitch { };
|
||||
@ -6719,6 +6729,8 @@ let
|
||||
|
||||
nsd = callPackage ../servers/dns/nsd { };
|
||||
|
||||
nsq = callPackage ../servers/nsq { };
|
||||
|
||||
opensmtpd = callPackage ../servers/mail/opensmtpd { };
|
||||
|
||||
petidomo = callPackage ../servers/mail/petidomo { };
|
||||
@ -7490,6 +7502,8 @@ let
|
||||
|
||||
numactl = callPackage ../os-specific/linux/numactl { };
|
||||
|
||||
gocode = callPackage ../development/tools/gocode { };
|
||||
|
||||
gogoclient = callPackage ../os-specific/linux/gogoclient { };
|
||||
|
||||
nss_ldap = callPackage ../os-specific/linux/nss_ldap { };
|
||||
@ -8074,6 +8088,8 @@ let
|
||||
|
||||
calibre = callPackage ../applications/misc/calibre { };
|
||||
|
||||
camlistore = callPackage ../applications/misc/camlistore { };
|
||||
|
||||
carrier = builderDefsPackage (import ../applications/networking/instant-messengers/carrier/2.5.0.nix) {
|
||||
inherit fetchurl stdenv pkgconfig perl perlXMLParser libxml2 openssl nss
|
||||
gtkspell aspell gettext ncurses avahi dbus dbus_glib python
|
||||
|
Loading…
Reference in New Issue
Block a user