labelImg: 1.8.1 -> 1.8.3

Switch to python3 and qt5 libraries also
This commit is contained in:
freezeboy 2020-07-11 11:53:55 +02:00
parent 345c44de53
commit 531cf77114
1 changed files with 22 additions and 11 deletions

View File

@ -1,20 +1,31 @@
{ stdenv, python2Packages, fetchurl }:
python2Packages.buildPythonApplication rec {
{ stdenv, python3Packages, fetchFromGitHub, qt5 }:
python3Packages.buildPythonApplication rec {
pname = "labelImg";
version = "1.8.1";
src = fetchurl {
url = "https://github.com/tzutalin/labelImg/archive/v${version}.tar.gz";
sha256 = "1banpkpbrny1jx3zsgs544xai62z5yvislbq782a5r47gv2f2k4a";
version = "1.8.3";
src = fetchFromGitHub {
owner = "tzutalin";
repo = "labelImg";
rev = "v${version}";
sha256 = "07v106fzlmxrbag4xm06m4mx9m0gckb27vpwsn7sap1bbgc1pap5";
};
nativeBuildInputs = with python2Packages; [
pyqt4
nativeBuildInputs = with python3Packages; [
pyqt5
qt5.wrapQtAppsHook
];
propagatedBuildInputs = with python2Packages; [
pyqt4
propagatedBuildInputs = with python3Packages; [
pyqt5
lxml
sip
];
preBuild = ''
make qt4py2
make qt5py3
'';
postInstall = ''
cp libs/resources.py $out/${python3Packages.python.sitePackages}/libs
'';
dontWrapQtApps = true;
preFixup = ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';
meta = with stdenv.lib; {
description = "LabelImg is a graphical image annotation tool and label object bounding boxes in images";