2022-06-26 10:26:21 +00:00
|
|
|
{ lib, stdenv, fetchurl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "mailcap";
|
2021-08-05 21:33:18 +00:00
|
|
|
version = "2.1.53";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://releases.pagure.org/mailcap/mailcap-${version}.tar.xz";
|
|
|
|
sha256 = "sha256-Xuou8XswSXe6PsuHr61DGfoEQPgl5Pb7puj6L/64h4U=";
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
substituteInPlace mailcap --replace "/usr/bin/" ""
|
|
|
|
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
|
2022-06-26 10:26:21 +00:00
|
|
|
install -D -m0644 -t $out/share/man/man5 mailcap.5
|
|
|
|
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +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;
|
|
|
|
};
|
|
|
|
}
|