file: fix detection of mimetype of xz files (#132809)

This commit is contained in:
marius851000 2021-08-06 12:45:31 +02:00 committed by GitHub
parent 8ab6ba6b1c
commit 04d50d249f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, file, zlib, libgnurx }:
{ lib, stdenv, fetchurl, file, zlib, libgnurx, fetchpatch }:
stdenv.mkDerivation rec {
pname = "file";
@ -16,6 +16,14 @@ stdenv.mkDerivation rec {
buildInputs = [ zlib ]
++ lib.optional stdenv.hostPlatform.isWindows libgnurx;
patches = [
# Fix the mime type detection of xz file. Is merged in master.
(fetchpatch {
url = "https://github.com/file/file/commit/9b0459afab309a82aa4e46f73a4e50dd641f3d39.patch";
sha256 = "sha256-6vjyIn5gVbgmhUlfXJKFRVltm8YKATKmh0/X6+2lLnM=";
})
];
doCheck = true;
makeFlags = lib.optional stdenv.hostPlatform.isWindows "FILE_COMPILE=file";