about summary refs log tree commit diff
path: root/pkgs/by-name/li/lilipod/package.nix
blob: b5d6f56768a2b2d2031097420dfeac74a7f76a92 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
, stdenv
}:

buildGoModule rec {
  pname = "lilipod";
  version = "0.0.3";

  src = fetchFromGitHub {
    owner = "89luca89";
    repo = "lilipod";
    rev = "v${version}";
    hash = "sha256-PqeYNLr4uXe+H+DLENlUpl1H2wV6VJvDoA+MVP3SRqY=";
  };

  vendorHash = null;

  nativeBuildInputs = [ installShellFiles ];

  buildPhase = ''
    runHook preBuild

    RELEASE_VERSION=${version} make all

    runHook postBuild
  '';

  checkPhase = ''
    runHook preCheck

    make coverage

    runHook postCheck
  '';

  installPhase = ''
    runHook preInstall

    install -Dm755 lilipod $out/bin/lilipod

    runHook postInstall
  '';

  postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
    installShellCompletion --cmd lilipod \
      --bash <($out/bin/lilipod completion bash) \
      --fish <($out/bin/lilipod completion fish) \
      --zsh <($out/bin/lilipod completion zsh)
  '';

  meta = {
    description = "A very simple (as in few features) container and image manager";
    longDescription = ''
      Lilipod is a very simple container manager with minimal features to:

      - Download and manager images
      - Create and run containers

      It tries to keep a somewhat compatible CLI interface with Podman/Docker/Nerdctl.
    '';
    homepage = "https://github.com/89luca89/lilipod";
    license = lib.licenses.gpl3Only;
    mainProgram = "lilipod";
    maintainers = with lib.maintainers; [ aleksana ];
    platforms = lib.platforms.linux;
  };
}