Skip to content

Add Nix package for PyQGIS API Documentation builder#209

Open
imincik wants to merge 1 commit into
qgis:mainfrom
imincik:nix-package
Open

Add Nix package for PyQGIS API Documentation builder#209
imincik wants to merge 1 commit into
qgis:mainfrom
imincik:nix-package

Conversation

@imincik

@imincik imincik commented Apr 22, 2025

Copy link
Copy Markdown

No description provided.

@nyalldawson

Copy link
Copy Markdown
Contributor

Can you help me understand what the use case is here? Currently all the documentation is built using github workflows, so there's really no need for this to be packaged for use elsewhere.

@imincik imincik force-pushed the nix-package branch 4 times, most recently from 4df81ef to d765424 Compare April 24, 2025 07:02
@imincik imincik force-pushed the nix-package branch 6 times, most recently from f9d0e1f to 535ea32 Compare May 9, 2025 08:45
@timlinux

timlinux commented May 12, 2025

Copy link
Copy Markdown
Member

Hi @nyalldawson

We are in the process of deploying new infrastructure with NixOS used for provisioning all the servers (including API docs and general documentation). Having this patch applied is important to us because the documentation needs to be built as a package and then deployed in order to be consistent with the methodology we are using for server deployments. All the packages will be discrete, repeatable deployments stored in cachix which is a cache platform for Nix packages.

There may be more nix related patches coming, would be grateful if we can incorporate this work. If you want more details we would be happy to hop into a call with you to explain a bit better the process we are following. @imincik is a seasoned and well respected Nix contributor, leading the effort to make geospatial tools available on Nix (including packaging QGIS on Nix) and has been contracted by the PSC (as well as contributing his own time as a volunteer) to help with our next gen infrastructure roll out that @Xpirix and I have been working on.

Regards

Tim

@nyalldawson

Copy link
Copy Markdown
Contributor

@timlinux
Does that mean the plan is to remove the publishing workflows from this repository too? How often will the new process run after a commit is merged here? Will that just be on a fixed frequency regardless of when changes are made here?

In regards to this PR -- is there any way to move these files into a subfolder? I really dislike having packaging related files cluttering up the root folder of a repository.

Comment thread flake.lock Outdated
@imincik

imincik commented Jul 30, 2025

Copy link
Copy Markdown
Author

In regards to this PR -- is there any way to move these files into a subfolder? I really dislike having packaging related files cluttering up the root folder of a repository.

package.nix file was moved to nix directory.

@imincik imincik marked this pull request as ready for review July 30, 2025 10:38
@imincik

imincik commented Jul 30, 2025

Copy link
Copy Markdown
Author

For the record, Nix packaging in QGIS repos was discussed during video call with @nyalldawson , @timlinux , @Xpirix and @imincik .

@imincik imincik marked this pull request as draft July 30, 2025 14:35
Comment thread flake.nix Outdated
Comment thread flake.nix Outdated
@imincik imincik force-pushed the nix-package branch 2 times, most recently from 56172af to 2e9bc31 Compare July 31, 2025 09:34
@imincik

imincik commented Jul 31, 2025

Copy link
Copy Markdown
Author

Documentation build is failing on following error after rebase on to the latest master of pyqgis-api-docs-builder

       > 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.
       >
       > /nix/store/plgd01gl1wvxyaxw2iafcr739s5icrsf-stdenv-linux/setup: line 1772:    53 Aborted                 (core dumped) python3 ./scripts/make_api_rst.py --version 3.44

This didn't happen before. Any ideas ?

@imincik

imincik commented Jul 31, 2025

Copy link
Copy Markdown
Author

Fails on

from qgis.core import QgsApplication
qgs = QgsApplication([], False)

The same command runs without problem in QGIS interactive Python console.

@imincik

imincik commented Aug 22, 2025

Copy link
Copy Markdown
Author

With

  env.QT_PLUGIN_PATH="${libsForQt5.qt5.qtbase}/${libsForQt5.qt5.qtbase.qtPluginPrefix}";
  env.QT_QPA_PLATFORM_PLUGIN_PATH="${libsForQt5.qt5.qtbase}/${libsForQt5.qt5.qtbase.qtPluginPrefix}/platforms";

build fails on

       > qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/nix/store/4k4s06lid9njbxsyp4awphxgraz7w04g-qtbase-5.15.16-bin/lib/qt-5.15.16/plugins/platforms" even though it was found.
       > This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
       >
       > Available platform plugins are: eglfs (from /nix/store/4k4s06lid9njbxsyp4awphxgraz7w04g-qtbase-5.15.16-bin/lib/qt-5.15.16/plugins/platforms), linuxfb (from /nix/store/4k4s06lid9njbxsyp4awphxgraz7w04g-qtbase-5.15.16-bin/lib/qt-5.15.16/plugins/platforms), minimal (from /nix/store/4k4s06lid9njbxsyp4awphxgraz7w04g-qtbase-5.15.16-bin/lib/qt-5.15.16/plugins/platforms), minimalegl (from /nix/store/4k4s06lid9njbxsyp4awphxgraz7w04g-qtbase-5.15.16-bin/lib/qt-5.15.16/plugins/platforms), offscreen (from /nix/store/4k4s06lid9njbxsyp4awphxgraz7w04g-qtbase-5.15.16-bin/lib/qt-5.15.16/plugins/platforms), vnc (from /nix/store/4k4s06lid9njbxsyp4awphxgraz7w04g-qtbase-5.15.16-bin/lib/qt-5.15.16/plugins/platforms), xcb (from /nix/store/4k4s06lid9njbxsyp4awphxgraz7w04g-qtbase-5.15.16-bin/lib/qt-5.15.16/plugins/platforms), eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
       >

@imincik

imincik commented Aug 22, 2025

Copy link
Copy Markdown
Author

Probably related to this change 2ca3643

@imincik imincik force-pushed the nix-package branch 2 times, most recently from 4e75484 to a1599f1 Compare August 22, 2025 10:49
@imincik

imincik commented Aug 22, 2025

Copy link
Copy Markdown
Author

Issues where fixed in a1599f1 . This change needs cleanup and should be squashed.

@imincik imincik marked this pull request as ready for review September 12, 2025 12:38
@imincik

imincik commented Sep 12, 2025

Copy link
Copy Markdown
Author

@nyalldawson , @timlinux PR is good to be merged now.

@imincik imincik requested a review from nyalldawson September 12, 2025 12:41
@3nids

3nids commented May 7, 2026

Copy link
Copy Markdown
Member

@imincik what's the status here? shall we merge this?

@3nids

3nids commented May 20, 2026

Copy link
Copy Markdown
Member

closing, feel free to reopen.

@3nids 3nids closed this May 20, 2026
@imincik

imincik commented May 22, 2026

Copy link
Copy Markdown
Author

@3nids , yes we definitely need to merge this PR. Sorry for late reply. Would you please re-open ? Thanks.

@3nids 3nids reopened this May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants