nixpkgs/pkgs/tools/misc/ccal/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
932 B
Nix
Raw Permalink Normal View History

2023-02-16 08:18:22 +01:00
{ stdenv
, lib
, fetchurl
, makeWrapper
, ghostscript_headless # for ps2pdf binary
}:
stdenv.mkDerivation rec {
pname = "ccal";
version = "2.5.3";
src = fetchurl {
url = "https://ccal.chinesebay.com/${pname}-${version}.tar.gz";
2023-02-16 08:18:22 +01:00
sha256 = "sha256-PUy9yfkFzgKrSEBB+79/C3oxmuajUMbBbWNuGlpQ35Y=";
};
nativeBuildInputs = [ makeWrapper ];
makeFlags = [ "CXX:=$(CXX)" "BINDIR=$(out)/bin" "MANDIR=$(out)/share/man" ];
installTargets = [ "install" "install-man" ];
# ccalpdf depends on a `ps2pdf` binary in PATH
postFixup = ''
wrapProgram $out/bin/ccalpdf \
--prefix PATH : ${lib.makeBinPath [ ghostscript_headless ]}:$out/bin
'';
meta = {
homepage = "https://ccal.chinesebay.com/ccal.htm";
2023-02-16 08:18:22 +01:00
description = "Command line Chinese calendar viewer, similar to cal";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [ sharzy ];
platforms = lib.platforms.all;
};
}