My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/development/python-modules/magic/default.nix

28 lines
554 B

{ lib, stdenv
, buildPythonPackage
, pkgs
}:
buildPythonPackage {
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 lib; {
description = "A Python wrapper around libmagic";
homepage = "http://www.darwinsys.com/file/";
license = licenses.lgpl2;
};
}