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

QOwnNotes: init at 17.03.08 #22836

Closed
wants to merge 1 commit into from
Closed

Conversation

vandenoever
Copy link
Contributor

QOwnNotes is a plain-text file notepad and todo-list manager with markdown support and ownCloud integration. http://www.qownnotes.org

Motivation for this change

Nice note taking application that integrates with NextCloud and OwnCloud.

Things done
  • [ x] Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • [x ] Tested execution of all binary files (usually in ./result/bin/)
  • [x ] Fits CONTRIBUTING.md.

@vandenoever
Copy link
Contributor Author

On my system I need to run this like so:

NIX_PROFILES="/nix/var/nix/profiles/default $HOME/.nix-profile" QOwnNotes

to avoid this message:

QOwnNotes(22546)/default unknown: Cannot mix incompatible Qt library (version 0x50601) with this library (version 0x50602)
Aborted

That happens because /nix/var/nix/profiles/default/bin/ holds an older Qt version.

@@ -0,0 +1,32 @@
{ stdenv, fetchgit, qt5 }:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are using qt5.callPackage, so instead of importing qt5 here, you must import the specific submodules you use. This is so that your package sees a consistent set of dependencies.


buildInputs = [ qt5.qtbase qt5.qtmultimedia qt5.qtscript ];

configurePhase = ''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add qmakeHook to your buildInputs and remove the custom configure phase.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this project the .pro file is located in src. Does qmakeHook have an option to deal with that?

The project also has a cmake build setup which also needs tweaking because the translations try to install in qt-base.

-- Install configuration: "Release"
CMake Error at src/cmake_install.cmake:44 (file):
  file cannot create directory:
  /nix/store/zacdil7n5av96y85rp0l74hnxw29kk4z-qtbase-5.6.2/translations.
  Maybe need administrative privileges.
Call Stack (most recent call first):
  cmake_install.cmake:37 (include)

@ttuegel
Copy link
Member

ttuegel commented Feb 15, 2017

That happens because /nix/var/nix/profiles/default/bin/ holds an older Qt version.

Unfortunately, we cannot support installing Qt libraries into system and user profiles. However, using wrapQtProgram will eliminate this error by ensuring that your program always finds the correct version first.

@vandenoever
Copy link
Contributor Author

The loading of the library libqminimal.so is the reason that Qt 5.6.1 loaded from Qt 5.6.2.
This snippet with wrapQtProgram is not enough to avoid that library from /nix/store/7...g-system-path/lib/qt5/plugins/platforms/libqminimal.so.

  preFixup = ''
    wrapQtProgram $out/bin/QOwnNotes \
      --set QT_PLUGIN_PATH "$out/plugins"
  '';

@vandenoever
Copy link
Contributor Author

@ttuegel The current version works but still has a few not so pretty things: NIX_PROFILES and configurePhase.

@vandenoever vandenoever changed the title QOwnNotes: init at 17.02.6 QOwnNotes: init at 17.03.08 Mar 27, 2017
QOwnNotes is a plain-text file notepad and todo-list manager with markdown support and ownCloud integration. http://www.qownnotes.org
@c0bw3b
Copy link
Contributor

c0bw3b commented Oct 24, 2018

@vandenoever I'm closing this PR since it is outdated by now.
But if you're still interested to bring QOwnNotes to nixpkgs feel free to come up with a new PR.

I have some working there for the last upstream version. It builds and runs but language selection from the settings does not seem to have any effect... If you want to improve on that :)

@c0bw3b c0bw3b closed this Oct 24, 2018
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

4 participants