Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, rustPlatform, openssl, pkg-config, Security }:
2
3rustPlatform.buildRustPackage rec {
4 pname = "dura";
5 version = "0.2.0";
6
7 src = fetchFromGitHub {
8 owner = "tkellogg";
9 repo = "dura";
10 rev = "v${version}";
11 sha256 = "sha256-xAcFk7z26l4BYYBEw+MvbG6g33MpPUvnpGvgmcqhpGM=";
12 };
13
14 cargoSha256 = "sha256-XOtPtOEKZMJzNeBZBT3Mc/KOjMOcz71byIv/ftcRP48=";
15
16 cargoPatches = [
17 ./Cargo.lock.patch
18 ];
19
20 doCheck = false;
21
22 buildInputs = [
23 openssl
24 ] ++ lib.optionals stdenv.isDarwin [
25 Security
26 ];
27
28 nativeBuildInputs = [
29 pkg-config
30 ];
31
32 meta = with lib; {
33 description = "A background process that saves uncommitted changes on git";
34 longDescription = ''
35 Dura is a background process that watches your Git repositories and
36 commits your uncommitted changes without impacting HEAD, the current
37 branch, or the Git index (staged files). If you ever get into an
38 "oh snap!" situation where you think you just lost days of work,
39 checkout a "dura" branch and recover.
40 '';
41 homepage = "https://github.com/tkellogg/dura";
42 license = licenses.asl20;
43 maintainers = with maintainers; [ drupol ];
44 };
45}