about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/misc/dura/default.nix
blob: eba3f16c36594e5da25725b527b30446285c07ce (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
{ lib, stdenv, fetchFromGitHub, rustPlatform, openssl, pkg-config, Security }:

rustPlatform.buildRustPackage rec {
  pname = "dura";
  version = "0.2.0";

  src = fetchFromGitHub {
    owner = "tkellogg";
    repo = "dura";
    rev = "v${version}";
    sha256 = "sha256-xAcFk7z26l4BYYBEw+MvbG6g33MpPUvnpGvgmcqhpGM=";
  };

  cargoSha256 = "sha256-XOtPtOEKZMJzNeBZBT3Mc/KOjMOcz71byIv/ftcRP48=";

  cargoPatches = [
    ./Cargo.lock.patch
  ];

  doCheck = false;

  buildInputs = [
    openssl
  ] ++ lib.optionals stdenv.isDarwin [
    Security
  ];

  nativeBuildInputs = [
    pkg-config
  ];

  meta = with lib; {
    description = "A background process that saves uncommitted changes on git";
    longDescription = ''
      Dura is a background process that watches your Git repositories and
      commits your uncommitted changes without impacting HEAD, the current
      branch, or the Git index (staged files). If you ever get into an
      "oh snap!" situation where you think you just lost days of work,
      checkout a "dura" branch and recover.
    '';
    homepage = "https://github.com/tkellogg/dura";
    license = licenses.asl20;
    maintainers = with maintainers; [ drupol ];
  };
}