summary refs log tree commit diff
path: root/pkgs/applications/misc/vcal/default.nix
blob: 9225bd86492e7f95cbf7db65533891424514c593 (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
{ stdenv, lib, fetchurl, perl }:

stdenv.mkDerivation rec {
  name = "vcal-${version}";
  version = "2.8";

  src = fetchurl {
    url    = "http://waynemorrison.com/software/vcal";
    sha256 = "0jrm0jzqxb1xjp24hwbzlxsh22gjssay9gj4zszljzdm68r5afvc";
  };

  nativeBuildInputs = [ perl ]; # for pod2man

  unpackPhase = ":";
  dontBuild = true;
  installPhase = ''
    runHook preInstall

    mkdir -p $out/{bin,share/man/man1}
    substitute ${src} $out/bin/vcal \
      --replace /usr/bin/perl ${perl}/bin/perl
    chmod 0755 $out/bin/*
    pod2man --name=vcal --release=${version} ${src} > $out/share/man/man1/vcal.1

    runHook postInstall
  '';

  # There are no tests
  doCheck = false;

  meta = with lib; {
    description = "Parser for VCalendar and ICalendar files, usable from the command line";
    homepage = http://waynemorrison.com/software/;
    license = licenses.asl20;
    maintainers = with maintainers; [ peterhoeg ];
  };
}