Skip to content

Commit

Permalink
Merge pull request #312909 from donovanglover/icoextract-cleanup
Browse files Browse the repository at this point in the history
icoextract: use thumbnailer from upstream
  • Loading branch information
natsukium authored Jul 12, 2024
2 parents eb0f74b + 0c5ebda commit 3a375fc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,29 +1,24 @@
{
lib,
buildPythonPackage,
fetchPypi,
pefile,
pillow,
pythonOlder,
setuptools,
python3Packages,
fetchFromGitHub,
}:

buildPythonPackage rec {
python3Packages.buildPythonApplication 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=";
src = fetchFromGitHub {
owner = "jlu5";
repo = "icoextract";
rev = version;
hash = "sha256-McVG8966NCEpzc9biawLvUgbQUtterkIud/9GwOeltI=";
};

build-system = [ setuptools ];
build-system = with python3Packages; [ setuptools ];

dependencies = [
dependencies = with python3Packages; [
pefile
pillow
];
Expand All @@ -34,8 +29,10 @@ buildPythonPackage rec {
pythonImportsCheck = [ "icoextract" ];

postInstall = ''
mkdir -p $out/share/thumbnailers
substituteAll ${./exe-thumbnailer.thumbnailer} $out/share/thumbnailers/exe-thumbnailer.thumbnailer
substituteInPlace exe-thumbnailer.thumbnailer \
--replace Exec=exe-thumbnailer Exec=$out/bin/exe-thumbnailer
install -Dm644 exe-thumbnailer.thumbnailer $out/share/thumbnailers
'';

meta = with lib; {
Expand All @@ -47,5 +44,6 @@ buildPythonPackage rec {
bryanasdev000
donovanglover
];
mainProgram = "icoextract";
};
}

This file was deleted.

4 changes: 3 additions & 1 deletion pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5757,7 +5757,9 @@ self: super: with self; {

idasen = callPackage ../development/python-modules/idasen { };

icoextract = callPackage ../development/python-modules/icoextract { };
icoextract = toPythonModule (pkgs.icoextract.override {
python3Packages = self;
});

icontract = callPackage ../development/python-modules/icontract { };

Expand Down

0 comments on commit 3a375fc

Please sign in to comment.