mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
* Added python-magic.
svn path=/nixpkgs/trunk/; revision=24758
This commit is contained in:
parent
239c243b0e
commit
cf8b8064ad
1 changed files with 23 additions and 0 deletions
|
@ -886,6 +886,29 @@ rec {
|
|||
};
|
||||
};
|
||||
|
||||
magic = buildPythonPackage rec {
|
||||
name = "magic-0.3.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://pypi.python.org/packages/source/p/python-magic/python-${name}.tar.gz";
|
||||
md5 = "397cff81d2502e81fd3830a61ca2ad2c";
|
||||
};
|
||||
|
||||
preConfigure =
|
||||
''
|
||||
# Ensure that the module can find libmagic by hard-coding the
|
||||
# path to libmagic.so. Maybe there is a nicer way.
|
||||
substituteInPlace magic.py --replace \
|
||||
"ctypes.util.find_library('magic')" \
|
||||
"'${pkgs.file}/lib/libmagic.so'"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A Python wrapper around libmagic";
|
||||
homepage = https://github.com/ahupp/python-magic;
|
||||
};
|
||||
};
|
||||
|
||||
setuptoolsDarcs = buildPythonPackage {
|
||||
name = "setuptools-darcs-1.2.9";
|
||||
|
||||
|
|
Loading…
Reference in a new issue