Merge pull request #142734 from trofi/fix-python_magic

This commit is contained in:
Doron Behar 2021-10-24 12:43:33 +00:00 committed by GitHub
commit cc5c851356
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,6 +3,7 @@
, python
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, substituteAll
, file
, glibcLocales
@ -20,6 +21,13 @@ buildPythonPackage rec {
};
patches = [
# pull upstream patch to support file-5.41
(fetchpatch {
name = "file-5.41-compat.patch";
url = "https://github.com/ahupp/python-magic/commit/0ae7e7ceac0e80e03adc75c858bb378c0427331a.patch";
sha256 = "0vclaamb56nza1mcy88wjbkh81hnish2gzvl8visa2cknhgdmk50";
})
(substituteAll {
src = ./libmagic-path.patch;
libmagic = "${file}/lib/libmagic${stdenv.hostPlatform.extensions.sharedLibrary}";