about summary refs log tree commit diff
path: root/pkgs/sternenseemann/logbook/default.nix
blob: 456cab9fcf91ccc7aadcfb693efe82cec4ae4384 (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
{ lib, buildDunePackage, fetchFromGitHub, fetchpatch
, ocaml_lwt, jingoo, ptime, angstrom, astring, cow}:

buildDunePackage rec {
  version = "0.2";
  pname = "logbook";

  src = fetchFromGitHub {
    owner  = "sternenseemann";
    repo   = pname;
    rev    = "v${version}";
    sha256 = "1x202546ivs46m1193bzlnkpi3mxjjs3c1hcrlnb21v5x4fjnd4m";
  };

  buildInputs = [ cow ocaml_lwt jingoo ];
  propagatedBuildInputs = [ ptime angstrom astring ];

  patches = lib.optionals (!lib.versionAtLeast "1.3.0" jingoo.version) [ (fetchpatch {
    url = "https://github.com/sternenseemann/logbook/commit/d4ee40ada4bba55505cc55ab653e69fa5c6406e6.diff";
    sha256 = "0dj6q2h1pxcniypx14if4gnfq7bbghsig9g51n7z2mad0fsji4sa";
  }) ];

  useDune2 = true;

  meta = with lib; {
    description = "A tool for personal log files";
    hydraPlatforms = [ "x86_64-linux" ];
    license = licenses.bsd3;
  };
}