Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / virtualization / flintlock / default.nix
blob21413fde6e1b8a112c777af63d3ac5dee7ea7a99
1 { lib
2 , cni-plugins
3 , buildGoModule
4 , firecracker
5 , containerd
6 , runc
7 , makeWrapper
8 , fetchFromGitHub
9 }:
11 buildGoModule rec{
12   pname = "flintlock";
13   version = "0.6.0";
15   src = fetchFromGitHub {
16     owner = "weaveworks";
17     repo = "flintlock";
18     rev = "v${version}";
19     sha256 = "sha256-jZi58mewQ2hlH/9H4iAF4Mvf9UK4F7sUR0xcCEaLzX0=";
20   };
22   vendorHash = "sha256-IGfNMe1fQfAGAOVsxmn/oxleHfniqL1TJKllCwpuWOU=";
24   subPackages = [ "cmd/flintlock-metrics" "cmd/flintlockd" ];
26   ldflags = [ "-s" "-w" "-X github.com/weaveworks/flintlock/internal/version.Version=v${version}" ];
28   nativeBuildInputs = [
29     makeWrapper
30   ];
32   buildInputs = [
33     firecracker
34   ];
36   postInstall = ''
37     for prog in flintlockd flintlock-metrics; do
38       wrapProgram "$out/bin/$prog" --prefix PATH : ${lib.makeBinPath [ cni-plugins firecracker containerd runc ]}
39     done
40   '';
42   meta = with lib; {
43     description = "Create and manage the lifecycle of MicroVMs backed by containerd";
44     homepage = "https://github.com/weaveworks-liquidmetal/flintlock";
45     license = licenses.mpl20;
46     platforms = [ "x86_64-linux" "aarch64-linux" ];
47     maintainers = with maintainers; [ techknowlogick ];
48   };