2018-11-24 16:52:43 +00:00
|
|
|
{ lib, fetchzip }:
|
|
|
|
|
|
|
|
let
|
2021-04-05 22:48:11 +01:00
|
|
|
version = "2.1.52";
|
2018-11-24 16:52:43 +00:00
|
|
|
|
|
|
|
in fetchzip {
|
|
|
|
name = "mailcap-${version}";
|
|
|
|
|
|
|
|
url = "https://releases.pagure.org/mailcap/mailcap-${version}.tar.xz";
|
2021-04-05 22:48:11 +01:00
|
|
|
sha256 = "sha256-2GRNg3zoMPMaOk2zoAx5sVIzjbQhnYJuaO8nrzWujVc=";
|
2018-11-24 16:52:43 +00:00
|
|
|
|
|
|
|
postFetch = ''
|
|
|
|
tar -xavf $downloadedFile --strip-components=1
|
|
|
|
substituteInPlace mailcap --replace "/usr/bin/" ""
|
2021-04-05 22:48:11 +01:00
|
|
|
gzip mailcap.5
|
2019-08-27 14:10:26 +01:00
|
|
|
sh generate-nginx-mimetypes.sh < mime.types > nginx-mime.types
|
2018-11-24 16:52:43 +00:00
|
|
|
|
2019-08-27 14:10:26 +01:00
|
|
|
install -D -m0644 nginx-mime.types $out/etc/nginx/mime.types
|
2018-11-24 16:52:43 +00:00
|
|
|
install -D -m0644 -t $out/etc mailcap mime.types
|
2021-04-05 22:48:11 +01:00
|
|
|
install -D -m0644 -t $out/share/man/man5 mailcap.5.gz
|
2018-11-24 16:52:43 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|