pythonPackages.magic: refactor move to python-modules

This commit is contained in:
Chris Ostrouchov 2018-10-15 17:13:23 -04:00 committed by Frederik Rietdijk
parent 93e026ce04
commit a8d1e5c4a5
2 changed files with 29 additions and 21 deletions

View File

@ -0,0 +1,28 @@
{ stdenv
, buildPythonPackage
, pkgs
}:
buildPythonPackage rec {
name = "${pkgs.file.name}";
src = pkgs.file.src;
patchPhase = ''
substituteInPlace python/magic.py --replace "find_library('magic')" "'${pkgs.file}/lib/libmagic${stdenv.hostPlatform.extensions.sharedLibrary}'"
'';
buildInputs = [ pkgs.file ];
preConfigure = "cd python";
# No test suite
doCheck = false;
meta = with stdenv.lib; {
description = "A Python wrapper around libmagic";
homepage = http://www.darwinsys.com/file/;
license = licenses.lgpl2;
};
}

View File

@ -5771,27 +5771,7 @@ in {
python_magic = callPackage ../development/python-modules/python-magic { }; python_magic = callPackage ../development/python-modules/python-magic { };
magic = buildPythonPackage rec { magic = callPackage ../development/python-modules/magic { };
name = "${pkgs.file.name}";
src = pkgs.file.src;
patchPhase = ''
substituteInPlace python/magic.py --replace "find_library('magic')" "'${pkgs.file}/lib/libmagic${stdenv.hostPlatform.extensions.sharedLibrary}'"
'';
buildInputs = with self; [ pkgs.file ];
preConfigure = "cd python";
# No test suite
doCheck = false;
meta = {
description = "A Python wrapper around libmagic";
homepage = http://www.darwinsys.com/file/;
};
};
m2crypto = buildPythonPackage rec { m2crypto = buildPythonPackage rec {
version = "0.24.0"; version = "0.24.0";