Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl }: 2 3stdenv.mkDerivation rec { 4 pname = "mailcap"; 5 version = "2.1.53"; 6 7 src = fetchurl { 8 url = "https://releases.pagure.org/mailcap/mailcap-${version}.tar.xz"; 9 sha256 = "sha256-Xuou8XswSXe6PsuHr61DGfoEQPgl5Pb7puj6L/64h4U="; 10 }; 11 12 installPhase = '' 13 runHook preInstall 14 15 substituteInPlace mailcap --replace "/usr/bin/" "" 16 sh generate-nginx-mimetypes.sh < mime.types > nginx-mime.types 17 18 install -D -m0644 nginx-mime.types $out/etc/nginx/mime.types 19 install -D -m0644 -t $out/etc mailcap mime.types 20 install -D -m0644 -t $out/share/man/man5 mailcap.5 21 22 runHook postInstall 23 ''; 24 25 meta = with lib; { 26 description = "Helper application and MIME type associations for file types"; 27 homepage = "https://pagure.io/mailcap"; 28 license = licenses.mit; 29 maintainers = with maintainers; [ c0bw3b ]; 30 platforms = platforms.all; 31 }; 32}