2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2018-10-15 21:13:23 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, pkgs
|
|
|
|
}:
|
|
|
|
|
2019-08-13 21:52:01 +00:00
|
|
|
buildPythonPackage {
|
2019-09-08 23:38:31 +00:00
|
|
|
name = pkgs.file.name;
|
2018-10-15 21:13:23 +00: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;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-10-15 21:13:23 +00:00
|
|
|
description = "A Python wrapper around libmagic";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.darwinsys.com/file/";
|
2018-10-15 21:13:23 +00:00
|
|
|
license = licenses.lgpl2;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|