Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

labelImg: 1.8.1 -> 1.8.3 #92916

Merged
merged 1 commit into from Aug 20, 2020
Merged

labelImg: 1.8.1 -> 1.8.3 #92916

merged 1 commit into from Aug 20, 2020

Conversation

freezeboy
Copy link
Contributor

@freezeboy freezeboy commented Jul 11, 2020

Switch to python3 and qt5 libraries also

Motivation for this change

Update package to latest release

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/223

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/258

@Lassulus
Copy link
Member

hmm, can't start it with nix-review, could be because I'm on stable and something with QT changed between stable and unstable:

qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Aborted (core dumped)

@freezeboy
Copy link
Contributor Author

unfortunately, I can't run nixpkgs-review on my current computer, as is it freezing everything.
but when I run a local nix-build it looks good.
If someone can double check with nixpkgs-review, it will be even better

@Lassulus
Copy link
Member

I was able to make it run with this derivation:

{ stdenv, python3Packages, fetchFromGitHub, qt5 }:
  python3Packages.buildPythonApplication rec {
    pname = "labelImg";
    version = "1.8.3";
    src = fetchFromGitHub {
      owner = "tzutalin";
      repo = "labelImg";
      rev = "v${version}";
      sha256 = "07v106fzlmxrbag4xm06m4mx9m0gckb27vpwsn7sap1bbgc1pap5";
    };
    nativeBuildInputs = with python3Packages; [
      pyqt5
      qt5.wrapQtAppsHook
    ];
    propagatedBuildInputs = with python3Packages; [
      pyqt5
      lxml
      sip
    ];
    preBuild = ''
      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";
      homepage = "https://github.com/tzutalin/labelImg";
      license = licenses.mit;
      platforms = platforms.linux;
      maintainers = [ maintainers.cmcdragonkai ];
    };
  }

Switch to python3 and qt5 libraries also
@freezeboy
Copy link
Contributor Author

obviously my environment with qt was the source of the problem

@Lassulus Lassulus merged commit 32a8968 into NixOS:master Aug 20, 2020
@freezeboy freezeboy deleted the update-labelimg branch September 11, 2020 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants