mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-27 08:04:14 +00:00
28 lines
550 B
Nix
28 lines
550 B
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildPythonPackage,
|
|
pkgs,
|
|
}:
|
|
|
|
buildPythonPackage {
|
|
inherit (pkgs.file) pname version 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 lib; {
|
|
description = "Python wrapper around libmagic";
|
|
homepage = "http://www.darwinsys.com/file/";
|
|
license = licenses.lgpl2;
|
|
};
|
|
}
|