diff options
| author | Parnell Springmeyer <ixmatus@users.noreply.github.com> | 2018-02-11 14:12:25 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-11 14:12:25 -0600 |
| commit | 6f95cb14595dc402bb64d1a99836eab63db2ce7a (patch) | |
| tree | cf9f83ca3f18d9e46add3281e29fd2ba87c17e6b /pkgs/development/python-modules/python-magic | |
| parent | c2a5f684d2c71003ef2159d0925a27c8866b277d (diff) | |
| parent | 7fad46051e640cde165e552d5dae62684a40abab (diff) | |
Merge branch '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; + }; +} |
