depot/third_party/nixpkgs/pkgs/development/python-modules/magic/default.nix
Default email a5adf1ddd8 Project import generated by Copybara.
GitOrigin-RevId: b3616bd96400ce0252c241d76fcafb64389defc6
2021-01-15 23:18:51 +01:00

28 lines
554 B
Nix

{ lib, stdenv
, buildPythonPackage
, pkgs
}:
buildPythonPackage {
name = pkgs.file.name;
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 lib; {
description = "A Python wrapper around libmagic";
homepage = "http://www.darwinsys.com/file/";
license = licenses.lgpl2;
};
}