summary refs log tree commit diff
path: root/pkgs/tools/admin/lxd/default.nix
blob: e1adb6ccf90dcaaace548f00caef02afbfc75c17 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# This file was generated by go2nix.
{ stdenv, lib, pkgconfig, lxc, goPackages, fetchFromGitHub }:

with goPackages;

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;
  };
}