mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-10 22:24:40 +00:00
![aleksana](/assets/img/avatar_default.png)
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
35 lines
928 B
Nix
35 lines
928 B
Nix
{ 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/ccal-${version}.tar.gz";
|
|
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";
|
|
description = "Command line Chinese calendar viewer, similar to cal";
|
|
license = lib.licenses.gpl3;
|
|
maintainers = with lib.maintainers; [ sharzy ];
|
|
platforms = lib.platforms.all;
|
|
};
|
|
}
|