mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 06:14:26 +03:00
pythonPackages.filemagic: init at 1.6
This commit is contained in:
parent
535c38dd73
commit
071f3b34e6
29
pkgs/development/python-modules/filemagic/default.nix
Normal file
29
pkgs/development/python-modules/filemagic/default.nix
Normal file
@ -0,0 +1,29 @@
|
||||
{ stdenv, lib, buildPythonPackage, fetchFromGitHub, file
|
||||
, isPy3k, mock, unittest2 }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "filemagic";
|
||||
version = "1.6";
|
||||
|
||||
# Don't use the PyPI source because it's missing files required for testing
|
||||
src = fetchFromGitHub {
|
||||
owner = "aliles";
|
||||
repo = "filemagic";
|
||||
rev = "138649062f769fb10c256e454a3e94ecfbf3017b";
|
||||
sha256 = "1jxf928jjl2v6zv8kdnfqvywdwql1zqkm1v5xn1d5w0qjcg38d4n";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace magic/api.py --replace "ctypes.util.find_library('magic')" \
|
||||
"'${file}/lib/libmagic${stdenv.hostPlatform.extensions.sharedLibrary}'"
|
||||
'';
|
||||
|
||||
checkInputs = [ (if isPy3k then mock else unittest2) ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "File type identification using libmagic";
|
||||
homepage = https://github.com/aliles/filemagic;
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ earvstedt ];
|
||||
};
|
||||
}
|
@ -408,6 +408,8 @@ in {
|
||||
|
||||
fdint = callPackage ../development/python-modules/fdint { };
|
||||
|
||||
filemagic = callPackage ../development/python-modules/filemagic { };
|
||||
|
||||
fuse = callPackage ../development/python-modules/fuse-python {
|
||||
inherit (pkgs) fuse pkgconfig;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user