summary refs log tree commit diff
path: root/pkgs/tools/misc/pal/default.nix
blob: 5456ffdf061c53967f72ab0aa58cbef30b43c6a4 (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, stdenv, fetchurl, glib, gettext, readline, pkg-config }:

stdenv.mkDerivation rec {
  pname = "pal";
  version = "0.4.3";
  src = fetchurl {
    url = "mirror://sourceforge/palcal/pal-${version}.tgz";
    sha256 = "072mahxvd7lcvrayl32y589w4v3vh7bmlcnhiksjylknpsvhqiyf";
  };

  patchPhase = ''
    sed -i -e 's/-o root//' -e 's,ESTDIR}/etc,ESTDIR}'$out/etc, src/Makefile
    sed -i -e 's,/etc/pal\.conf,'$out/etc/pal.conf, src/input.c
  '';

  makeFlags = [ "prefix=$(out)" ];

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [ glib gettext readline ];

  hardeningDisable = [ "format" ];

  meta = {
    homepage = "https://palcal.sourceforge.net/";
    description = "Command-line calendar program that can keep track of events";
    license = lib.licenses.gpl2;
    maintainers = with lib.maintainers; [viric];
    platforms = with lib.platforms; linux;
  };
}