From 693bc7d44e26c9bbec020da37e1dfc2efe30e54d Mon Sep 17 00:00:00 2001 From: Charles Strahan Date: Mon, 23 Jun 2014 05:20:41 -0400 Subject: [PATCH] add fleet package --- pkgs/servers/fleet/default.nix | 30 ++++++++++++ pkgs/servers/fleet/deps.nix | 81 +++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 113 insertions(+) create mode 100644 pkgs/servers/fleet/default.nix create mode 100644 pkgs/servers/fleet/deps.nix diff --git a/pkgs/servers/fleet/default.nix b/pkgs/servers/fleet/default.nix new file mode 100644 index 000000000000..627c1ff0cf90 --- /dev/null +++ b/pkgs/servers/fleet/default.nix @@ -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; + }; +} diff --git a/pkgs/servers/fleet/deps.nix b/pkgs/servers/fleet/deps.nix new file mode 100644 index 000000000000..d0529db37a2f --- /dev/null +++ b/pkgs/servers/fleet/deps.nix @@ -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); +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 782443c13b62..1428e2594a41 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6653,6 +6653,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 { };