about summary refs log tree commit diff
path: root/pkgs/tools/admin
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2016-06-10 09:27:04 +0000
committerRobin Gloster <mail@glob.in>2016-06-10 09:27:04 +0000
commit8031cba2ab3146977141fc504bea2a1e03b5c126 (patch)
tree0cd68c0007851dfed7d7f8247754b5c4b356704e /pkgs/tools/admin
parent2a5e64b69c83592caf900cb0b7213235e96368de (diff)
parent656c48f141be5886c515a1a874a47472cbbac6bd (diff)
downloadnixlib-8031cba2ab3146977141fc504bea2a1e03b5c126.tar
nixlib-8031cba2ab3146977141fc504bea2a1e03b5c126.tar.gz
nixlib-8031cba2ab3146977141fc504bea2a1e03b5c126.tar.bz2
nixlib-8031cba2ab3146977141fc504bea2a1e03b5c126.tar.lz
nixlib-8031cba2ab3146977141fc504bea2a1e03b5c126.tar.xz
nixlib-8031cba2ab3146977141fc504bea2a1e03b5c126.tar.zst
nixlib-8031cba2ab3146977141fc504bea2a1e03b5c126.zip
Merge remote-tracking branch 'upstream/master' into hardened-stdenv
Diffstat (limited to 'pkgs/tools/admin')
-rw-r--r--pkgs/tools/admin/lxd/default.nix33
-rw-r--r--pkgs/tools/admin/lxd/deps.json26
2 files changed, 59 insertions, 0 deletions
diff --git a/pkgs/tools/admin/lxd/default.nix b/pkgs/tools/admin/lxd/default.nix
new file mode 100644
index 000000000000..c8717ad1f6cb
--- /dev/null
+++ b/pkgs/tools/admin/lxd/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, lib, pkgconfig, lxc, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  name = "lxd-${version}";
+  version = "2.0.0.rc4";
+  rev = "lxd-${version}";
+
+  goPackagePath = "github.com/lxc/lxd";
+
+  src = fetchFromGitHub {
+    inherit rev;
+    owner = "lxc";
+    repo = "lxd";
+    sha256 = "1rpyyj6d38d9kmb47dcmy1x41fiacj384yx01yslsrj2l6qxcdjn";
+  };
+
+  goDeps = ./deps.json;
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ lxc ];
+
+  postInstall = ''
+    cp go/src/$goPackagePath/scripts/lxd-images $bin/bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Daemon based on liblxc offering a REST API to manage containers";
+    homepage = https://github.com/lxc/lxd;
+    license = licenses.asl20;
+    maintainers = with maintainers; [ globin fpletz ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/tools/admin/lxd/deps.json b/pkgs/tools/admin/lxd/deps.json
new file mode 100644
index 000000000000..3e9a811accef
--- /dev/null
+++ b/pkgs/tools/admin/lxd/deps.json
@@ -0,0 +1,26 @@
+[
+  {
+    "include": "../../../go-modules/libs.json",
+    "packages": [
+      "github.com/golang/protobuf",
+      "github.com/gorilla/websocket",
+      "github.com/syndtr/gocapability",
+      "gopkg.in/inconshreveable/log15.v2",
+      "github.com/gorilla/mux",
+      "github.com/pborman/uuid",
+      "golang.org/x/crypto",
+      "gopkg.in/flosch/pongo2.v3",
+      "gopkg.in/tomb.v2",
+      "github.com/olekukonko/tablewriter",
+      "github.com/mattn/go-sqlite3",
+      "gopkg.in/lxc/go-lxc.v2",
+      "gopkg.in/yaml.v2",
+      "github.com/mattn/go-runewidth",
+      "github.com/coreos/go-systemd",
+      "github.com/dustinkirkland/golang-petname",
+      "github.com/gorilla/context",
+      "github.com/mattn/go-colorable",
+      "github.com/gosexy/gettext"
+    ]
+  }
+]