Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 015e3edd24cf
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ff0148d868bd
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Oct 9, 2019

  1. nixos/nginx: use mailcap mime.types

    The mime type definitions included with nginx are very incomplete, so
    we use a list of mime types from the mailcap package, which is also
    used by most other Linux distributions by default.
    Milan Pässler authored and alyssais committed Oct 9, 2019

    Verified

    This commit was signed with the committer’s verified signature.
    snyk-bot Snyk bot
    Copy the full SHA
    ff0148d View commit details
Showing with 7 additions and 2 deletions.
  1. +4 −1 nixos/modules/services/web-servers/nginx/default.nix
  2. +3 −1 pkgs/data/misc/mailcap/default.nix
5 changes: 4 additions & 1 deletion nixos/modules/services/web-servers/nginx/default.nix
Original file line number Diff line number Diff line change
@@ -61,7 +61,10 @@ let
${optionalString (cfg.httpConfig == "" && cfg.config == "") ''
http {
include ${cfg.package}/conf/mime.types;
# The mime type definitions included with nginx are very incomplete, so
# we use a list of mime types from the mailcap package, which is also
# used by most other Linux distributions by default.
include ${pkgs.mailcap}/etc/nginx/mime.types;
include ${cfg.package}/conf/fastcgi.conf;
include ${cfg.package}/conf/uwsgi_params;
4 changes: 3 additions & 1 deletion pkgs/data/misc/mailcap/default.nix
Original file line number Diff line number Diff line change
@@ -7,13 +7,15 @@ in fetchzip {
name = "mailcap-${version}";

url = "https://releases.pagure.org/mailcap/mailcap-${version}.tar.xz";
sha256 = "0m1rls4z85aby9fggwx2x70b4y6l0jjyiqdv30p8g91nv8hrq9fw";
sha256 = "08d0avz8971hkggd60dk9yyd14izz24yag3prpfafbvm670jlmqg";

postFetch = ''
tar -xavf $downloadedFile --strip-components=1
substituteInPlace mailcap --replace "/usr/bin/" ""
gzip mailcap.4
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
install -D -m0644 -t $out/share/man/man4 mailcap.4.gz
'';