depot/third_party/nixpkgs/pkgs/development/python-modules/icoextract/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

51 lines
1 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
pefile,
pillow,
pythonOlder,
setuptools,
}:
buildPythonPackage rec {
pname = "icoextract";
version = "0.1.5";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
extension = "tar.gz";
hash = "sha256-/UxnWNyRNtwI4Rxx97i5QyjeMrUr5Sq+TfLTmU0xWyc=";
};
build-system = [ setuptools ];
dependencies = [
pefile
pillow
];
# tests expect mingw and multiarch
doCheck = false;
pythonImportsCheck = [ "icoextract" ];
postInstall = ''
mkdir -p $out/share/thumbnailers
substituteAll ${./exe-thumbnailer.thumbnailer} $out/share/thumbnailers/exe-thumbnailer.thumbnailer
'';
meta = with lib; {
description = "Extract icons from Windows PE files";
homepage = "https://github.com/jlu5/icoextract";
changelog = "https://github.com/jlu5/icoextract/blob/${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [
bryanasdev000
donovanglover
];
};
}