diff options
| author | Matthew Justin Bauer <mjbauer95@gmail.com> | 2018-03-22 11:25:09 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-22 11:25:09 -0500 |
| commit | 12f14a0909cec960337e9b8a5cf209b045003ffb (patch) | |
| tree | ed028fd3d42d8c1f285680c1f17e9b65e5bef519 /pkgs/development/python-modules/python-magic | |
| parent | 41991e09adc7dfe8d3524002f035ed2b94fec841 (diff) | |
| parent | 678211bb37821597a8c4426664cbe3bc821ac70e (diff) | |
Merge branch 'master' into texmacsDarwin
Diffstat (limited to 'pkgs/development/python-modules/python-magic')
| -rw-r--r-- | pkgs/development/python-modules/python-magic/default.nix | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/python-magic/default.nix b/pkgs/development/python-modules/python-magic/default.nix new file mode 100644 index 000000000000..d48a6288a7dd --- /dev/null +++ b/pkgs/development/python-modules/python-magic/default.nix @@ -0,0 +1,28 @@ +{ buildPythonPackage, lib, fetchPypi, file, stdenv }: + +buildPythonPackage rec { + pname = "python-magic"; + version = "0.4.15"; + + src = fetchPypi { + inherit pname version; + sha256 = "f3765c0f582d2dfc72c15f3b5a82aecfae9498bd29ca840d72f37d7bd38bfcd5"; + }; + + postPatch = '' + substituteInPlace magic.py --replace "ctypes.util.find_library('magic')" "'${file}/lib/libmagic${stdenv.hostPlatform.extensions.sharedLibrary}'" + ''; + + doCheck = false; + + # TODO: tests are failing + #checkPhase = '' + # ${python}/bin/${python.executable} ./test.py + #''; + + meta = { + description = "A python interface to the libmagic file type identification library"; + homepage = https://github.com/ahupp/python-magic; + license = lib.licenses.mit; + }; +} |
