NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.49k stars 12.99k forks source link

Package request: mu editor #73975

Open das-g opened 4 years ago

das-g commented 4 years ago

Project description A small, simple editor for beginner Python programmers. Written in Python and Qt5.

Metadata

ardek66 commented 4 years ago

I think Mu can be a nice addition to the repos since it is a very nice tool for learning, and it can probably extend the use of NixOS. I'll try to package it.

das-g commented 4 years ago

I've started some work on this at https://github.com/das-g/nixpkgs/tree/mu-editor-init. (See diff to NixPkgs upstream.)

Currently on that branch, nix build -f . mu-editor fails with

builder for '/nix/store/ip56mljhgpk4g6s3m6ni68l7g3z7kmwx-pyqtchart-5.12.drv' failed with exit code 1; last 8 log lines:
  qmakePrePhase
  unpacking sources
  unpacking source archive /nix/store/vjlyz9ih2dya2wgrvjqbin1n8ghy5v8n-PyQtChart_gpl-5.12.tar.gz
  source root is PyQtChart_gpl-5.12
  setting SOURCE_DATE_EPOCH to timestamp 1549293609 of file PyQtChart_gpl-5.12/sip/QtChart/qxyseries.sip
  patching sources
  configuring
  Error: Unable to import PyQt5.QtCore. Make sure PyQt5 is installed.
cannot build derivation '/nix/store/9pa4wpj4mfv48vp51vig85lwx5z4flgn-mu-editor-1.1.0-alpha.2.drv': 1 dependencies couldn't be built
[0 built (1 failed), 0.0 MiB DL]
error: build of '/nix/store/9pa4wpj4mfv48vp51vig85lwx5z4flgn-mu-editor-1.1.0-alpha.2.drv' failed

I don't really know how to continue, so feel free to pick up from there or start fresh.

jtojnar commented 4 years ago

@das-g The Python libraries might need to go to propagatedBuildInputs.

stale[bot] commented 4 years ago

Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity. Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on irc.freenode.net.
jtojnar commented 4 years ago

Ugh.

On Sun, 31 May, 2020 at 21:25, stale[bot] notifications@github.com wrote:

Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity. Here are suggestions that might help resolve this more quickly:

Search for maintainers and people that previously touched the related code and @ mention them in a comment. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on irc.freenode.net. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

das-g commented 4 years ago

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this.

still important to me :hugs:

david-sawatzke commented 4 years ago

I've continued @das-g work at https://github.com/david-sawatzke/nixpkgs/tree/mu-editor-init, with some copy-pasta for pyqtchart, but it seems the python qscintilla package contains PyQt5?

pythonCatchConflictsPhase
Found duplicated packages in closure for dependency 'PyQt5':
  PyQt5 5.14.2 (/nix/store/viyh6yf9gjs4a55kyainh3d3vash3k0w-python3.7-PyQt5-5.14.2/lib/python3.7/site-packages)
  PyQt5 5.14.2 (/nix/store/bs29a9abcdkrk9damk8dac9zniagvljh-python3.7-qscintilla-2.11.2/lib/python3.7/site-packages)

If that's fixed mu may even work, but I wouldn't count on it and it needs some cleanup work. @lsix Is there a reason python3Packages.qscintilla-qt5 include PyQt5?

It seems the PyQt5 tree is mirrored with lndir for qscintilla-qt5

lsix commented 4 years ago

Sorry for the late reply.

I am not quite sure why this was done this way… I’ll need to check. I’ll let you know if I come with a cleverer approach.

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info

das-g commented 3 years ago

I've rebased the work so far and squashed related commits. Result: https://github.com/NixOS/nixpkgs/compare/master...das-g:mu-editor-init (currently https://github.com/NixOS/nixpkgs/compare/master...das-g:f4de32e)

das-g commented 3 years ago

I've rebased the work so far and squashed related commits. Result: master...das-g:mu-editor-init (currently master...das-g:f4de32e)

With this, python3Packages.pgzero fails to build with

builder for '/nix/store/ffa0q9j7b4jsaawvv46dd853n3dmf0af-python3.8-pgzero-1.2.post5.drv' failed with exit code 1; last 10 log lines:
  adding 'pgzero-1.2.dist-info/top_level.txt'
  adding 'pgzero-1.2.dist-info/RECORD'
  removing build/bdist.linux-x86_64/wheel
  Finished executing setuptoolsBuildPhase
  installing
  Executing pipInstallPhase
  /build/source/dist /build/source
  Processing ./pgzero-1.2-py3-none-any.whl
  ERROR: Could not find a version that satisfies the requirement pygame<2.0,>=1.9.2 (from pgzero)
  ERROR: No matching distribution found for pygame<2.0,>=1.9.2
[0 built (1 failed)]
error: build of '/nix/store/ffa0q9j7b4jsaawvv46dd853n3dmf0af-python3.8-pgzero-1.2.post5.drv' failed

I guess we have to either

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info

alarsyo commented 2 years ago

Still important!

@das-g for what it's worth it looks like pgzero released a 1.2.1 version that depends on pygame 2.0+

das-g commented 2 years ago

I've rebased the work so far on current master: https://github.com/NixOS/nixpkgs/compare/master...das-g:0f7f9a5a8

And I've tried to get it up-to-date and closer to build: https://github.com/NixOS/nixpkgs/compare/das-g:0f7f9a5a8...das-g:249dbb06 (I haven't yet squashed related commits, so that one can still see what I tried.)

Now

nix-build . -A python3Packages.pyqtchart

fails with

configure.py: error: '/nix/store/f3lvc2x6m0pb8606q3pzzzw5f96sys3a-python3.9-PyQt5-5.15.4/share/sip/PyQt5' is not a directory
full output ``` these derivations will be built: /nix/store/z9wd3ywv1168dvvcqqxmyikgdlhqy9xy-python3.9-PyQtChart-5.15.4.drv building '/nix/store/z9wd3ywv1168dvvcqqxmyikgdlhqy9xy-python3.9-PyQtChart-5.15.4.drv'... Sourcing python-remove-tests-dir-hook Sourcing python-catch-conflicts-hook.sh Sourcing python-remove-bin-bytecode-hook.sh Sourcing python-imports-check-hook.sh Using pythonImportsCheckPhase Sourcing python-namespaces-hook qmakePrePhase qtPreHook unpacking sources unpacking source archive /nix/store/ikz9p78qrr7dg15nazanpswxj5x1k9n6-PyQtChart-5.15.4.tar.gz source root is PyQtChart-5.15.4 setting SOURCE_DATE_EPOCH to timestamp 1614938607 of file PyQtChart-5.15.4/PKG-INFO patching sources configuring Usage: python configure.py [options] configure.py: error: '/nix/store/f3lvc2x6m0pb8606q3pzzzw5f96sys3a-python3.9-PyQt5-5.15.4/share/sip/PyQt5' is not a directory builder for '/nix/store/z9wd3ywv1168dvvcqqxmyikgdlhqy9xy-python3.9-PyQtChart-5.15.4.drv' failed with exit code 2 error: build of '/nix/store/z9wd3ywv1168dvvcqqxmyikgdlhqy9xy-python3.9-PyQtChart-5.15.4.drv' failed ```

I guess this is due to https://github.com/NixOS/nixpkgs/blob/249dbb068af1525ef32e3534e03ab98966b43d73/pkgs/development/python-modules/pyqtchart/default.nix#L40, but as I'm not the original author of that line and have no clue about Qt and packaging its libs, I'm kinda lost here. Can someone provide some guidance? (@david-sawatzke, who authored that line, maybe?)

stale[bot] commented 2 years ago

I marked this as stale due to inactivity. → More info

alarsyo commented 2 years ago

Still important.

malbarbo commented 2 years ago

Added in https://github.com/NixOS/nixpkgs/pull/177034.