about summary refs log tree commit diff
path: root/pkgs/applications/version-management/yadm/default.nix
blob: e0e26b804f58fad0b61661bac30a2acb9082b8de (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
{ lib, stdenv, fetchFromGitHub, git, gnupg, installShellFiles }:

stdenv.mkDerivation rec {
  pname = "yadm";
  version = "3.1.1";

  buildInputs = [ git gnupg ];

  nativeBuildInputs = [ installShellFiles ];

  src = fetchFromGitHub {
    owner  = "TheLocehiliosan";
    repo   = "yadm";
    rev    = version;
    sha256 = "sha256-bgiRBlqEjDq0gQ0+aUWpFDeE2piFX3Gy2gEAXgChAOk=";
  };

  dontConfigure = true;
  dontBuild = true;

  installPhase = ''
    runHook preInstall
    install -Dt $out/bin yadm
    runHook postInstall
  '';

  postInstall = ''
    installManPage yadm.1
    installShellCompletion --cmd yadm \
      --zsh completion/zsh/_yadm \
      --bash completion/bash/yadm
  '';

  meta = {
    homepage = "https://github.com/TheLocehiliosan/yadm";
    description = "Yet Another Dotfiles Manager";
    longDescription = ''
      yadm is a dotfile management tool with 3 main features:
      * Manages files across systems using a single Git repository.
      * Provides a way to use alternate files on a specific OS or host.
      * Supplies a method of encrypting confidential data so it can safely be stored in your repository.
    '';
    license = lib.licenses.gpl3Plus;
    maintainers = with lib.maintainers; [ abathur ];
    platforms = lib.platforms.unix;
  };
}