mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 14:47:06 +00:00
29 lines
563 B
Nix
29 lines
563 B
Nix
{ 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;
|
|
};
|
|
|
|
}
|