2018-10-15 22:13:23 +01:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, pkgs
|
|
|
|
}:
|
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
buildPythonPackage {
|
2019-09-09 00:38:31 +01:00
|
|
|
name = pkgs.file.name;
|
2018-10-15 22:13:23 +01:00
|
|
|
|
|
|
|
src = pkgs.file.src;
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace python/magic.py --replace "find_library('magic')" "'${pkgs.file}/lib/libmagic${stdenv.hostPlatform.extensions.sharedLibrary}'"
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ pkgs.file ];
|
|
|
|
|
|
|
|
preConfigure = "cd python";
|
|
|
|
|
|
|
|
# No test suite
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A Python wrapper around libmagic";
|
|
|
|
homepage = http://www.darwinsys.com/file/;
|
|
|
|
license = licenses.lgpl2;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|