diff options
| author | Parnell Springmeyer <parnell@digitalmentat.com> | 2018-02-13 17:28:45 -0600 |
|---|---|---|
| committer | Parnell Springmeyer <parnell@digitalmentat.com> | 2018-02-13 17:28:45 -0600 |
| commit | 0a603ee165c9481476fd9ff3da66573c115fdb73 (patch) | |
| tree | d24cef418971c3a015dd39918091557c612fc575 /pkgs/development/python-modules/python-magic | |
| parent | e4ec980e9ced7dbea0fb1310f831207bbc7175b0 (diff) | |
| parent | a4621c0f684de162023afed671ecc4442ca8fb49 (diff) | |
Merge remote-tracking branch 'upstream/master' into parnell/fetchdocker
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..56be2e3448ae --- /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.13"; + + src = fetchPypi { + inherit pname version; + sha256 = "128j9y30zih6cyjyjnxhghnvpjm8vw40a1q7pgmrp035yvkaqkk0"; + }; + + 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; + }; +} |
