nixpkgs-suyu/pkgs/data/misc/mailcap/default.nix

31 lines
887 B
Nix
Raw Normal View History

{ lib, fetchzip }:
let
2021-04-30 23:33:48 +02:00
version = "2.1.53";
in fetchzip {
name = "mailcap-${version}";
url = "https://releases.pagure.org/mailcap/mailcap-${version}.tar.xz";
2021-04-30 23:33:48 +02:00
sha256 = "sha256-6JPj2tZgoTEZ8hNEi9ZZhElBNm9SRTSXifMmCicwiLo=";
postFetch = ''
tar -xavf $downloadedFile --strip-components=1
substituteInPlace mailcap --replace "/usr/bin/" ""
2021-04-05 23:48:11 +02:00
gzip mailcap.5
sh generate-nginx-mimetypes.sh < mime.types > nginx-mime.types
install -D -m0644 nginx-mime.types $out/etc/nginx/mime.types
install -D -m0644 -t $out/etc mailcap mime.types
2021-04-05 23:48:11 +02:00
install -D -m0644 -t $out/share/man/man5 mailcap.5.gz
'';
meta = with lib; {
description = "Helper application and MIME type associations for file types";
homepage = "https://pagure.io/mailcap";
license = licenses.mit;
maintainers = with maintainers; [ c0bw3b ];
platforms = platforms.all;
};
}