diff options
author | Artturin <Artturin@artturin.com> | 2022-06-05 00:08:12 +0300 |
---|---|---|
committer | Artturin <Artturin@artturin.com> | 2022-06-05 00:09:20 +0300 |
commit | 80f9a78c01df1fafc4e0743a8ca763018bc0ff45 (patch) | |
tree | 07ed90afadf962264246fdba8fab0a1396307683 /pkgs/data | |
parent | 81c57a8407e943526cc5ba445ed2b65c87038b2d (diff) |
mailcap: fix build
and prevent future inf rec issues
Diffstat (limited to 'pkgs/data')
-rw-r--r-- | pkgs/data/misc/mailcap/default.nix | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/pkgs/data/misc/mailcap/default.nix b/pkgs/data/misc/mailcap/default.nix index 3519b01f54ba0..06c8047e1cab2 100644 --- a/pkgs/data/misc/mailcap/default.nix +++ b/pkgs/data/misc/mailcap/default.nix @@ -1,23 +1,25 @@ -{ lib, fetchzip }: +{ lib, stdenv, fetchurl }: -let +stdenv.mkDerivation rec { + pname = "mailcap"; version = "2.1.53"; -in fetchzip { - name = "mailcap-${version}"; + src = fetchurl { + url = "https://releases.pagure.org/mailcap/mailcap-${version}.tar.xz"; + sha256 = "sha256-Xuou8XswSXe6PsuHr61DGfoEQPgl5Pb7puj6L/64h4U="; + }; - url = "https://releases.pagure.org/mailcap/mailcap-${version}.tar.xz"; - sha256 = "sha256-6JPj2tZgoTEZ8hNEi9ZZhElBNm9SRTSXifMmCicwiLo="; + installPhase = '' + runHook preInstall - postFetch = '' - tar -xavf $downloadedFile --strip-components=1 substituteInPlace mailcap --replace "/usr/bin/" "" - 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 - install -D -m0644 -t $out/share/man/man5 mailcap.5.gz + install -D -m0644 -t $out/share/man/man5 mailcap.5 + + runHook postInstall ''; meta = with lib; { |