icoextract: use thumbnailer from upstream

Fixes an issue where upstream updated the thumbnailer by fetching from
GitHub instead of PyPI.
This commit is contained in:
Donovan Glover 2024-05-19 10:04:17 -04:00
parent a4630ce475
commit 70123e0915
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
2 changed files with 10 additions and 10 deletions

View File

@ -1,3 +0,0 @@
[Thumbnailer Entry]
Exec=@out@/bin/exe-thumbnailer -v -s %s %i %o
MimeType=application/x-ms-dos-executable;application/x-dosexec;application/x-msdownload

View File

@ -1,7 +1,7 @@
{
lib,
python3Packages,
fetchPypi,
fetchFromGitHub,
}:
python3Packages.buildPythonApplication rec {
@ -9,10 +9,11 @@ python3Packages.buildPythonApplication rec {
version = "0.1.5";
pyproject = true;
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 = with python3Packages; [ setuptools ];
@ -28,8 +29,10 @@ python3Packages.buildPythonApplication 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; {