about summary refs log tree commit diff
path: root/pkgs/by-name/wh/when/package.nix
blob: 65fe306f447f54de6f1d79896ee6eb1c37c65f7b (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
{ lib
, stdenvNoCC
, perl
, installShellFiles
, fetchFromBitbucket
}:

stdenvNoCC.mkDerivation (finalAttrs: {
  pname   = "when";
  version = "1.1.45";

  src = fetchFromBitbucket {
    repo  = "when";
    owner = "ben-crowell";
    rev   = finalAttrs.version;
    hash  = "sha256-+ggYjY6/aTUrdvREn0TTQ4Pu/VR4QTjflDaicRXuOMs=";
  };

  buildInputs = [ perl ];

  nativeBuildInputs = [ installShellFiles ];

  postBuild = ''
     pod2man $src/when when.1
  '';

  installPhase = ''
     runHook preInstall

     install -Dm755 when $out/bin/when
     installManPage when.1

     runHook postInstall
  '';

  meta = with lib; {
    description = "An extremely simple personal calendar program";
    homepage    = "https://www.lightandmatter.com/when/when.html";
    license     = licenses.gpl2Only;
    mainProgram = "when";
    maintainers = with maintainers; [ vonixxx ];
    platforms   = platforms.all;
  };
})