As a learning exercise – plus a useful tool for small-n-quick GUI apps, if it worked – I thought I would try and get Gambas (Home Page • Wikipedia) at least built and running under NixOS.
I just wanted to post about where I got up to, in case anyone wants to take this further in future. Hopefully I’m not too far out of line in doing so here .
The expression, as at this writing, can be found here:
https://gist.github.com/aexoxea/844dea42ac4a993268e7f11b5b8707c8
I preface this by noting that Gambas is modular, so missing dependencies reduce available functionality but don’t (in most cases) cause a build failure.
The first outstanding problem is that this expression won’t succeed (heh), at least for me:
- The gb.qt4.webkit build craters on WebKit:
CXXLD gb.qt4.webkit.la
/nix/store/<hash>-binutils-<ver>/bin/ld: cannot find -lwebcore
/nix/store/<hash>-binutils-<ver>/bin/ld: cannot find -ljscore
collect2: error: ld returned 1 exit status
- If you remove
qt48Full
, instead the gb.qt5.webkit build craters on WebKit:
Making all in webkit
make[5]: Entering directory '/build/gambas-3.13.0/gb.qt5/src/webkit'
CXX gb_qt5_webkit_la-main.lo
In file included from main.cpp:34:0:
cwebhittest.h:30:10: fatal error: QWebHitTestResult: No such file or directory
#include <QWebHitTestResult>
^~~~~~~~~~~~~~~~~~~
compilation terminated.
- If you also remove
qt5.qtwebkit
, the Gambas IDE will be omitted, as it needs one of the WebKits. Needless to say, not having the IDE rather defeats the purpose.
The second outstanding problem is that a handful of modules are disabled because required files can’t be found during the (long) configure phase:
-
gb.compress.bzlib2: Can’t find
bzlib.h
orlibbz2.so
(should find them inbzip2
). -
gb.db.mysql: Can’t find
mysql.h
,my_config.h
orlibmysqlclient.so
(should find them inmariadb
). -
gb.db.odbc: Can’t find
sql.h
,sqlext.h
,sqltypes.h
orlibodbc.so
(should find them inunixODBC
). -
gb.db.postgresql: Can’t find
libpq-fe.h
,postgres.h
,pg_type.h
orlibpq.so
(should find them inpostgresql
). -
gb.gmp: Can’t find
gmp.h
orlibgmp.so
(should find them ingmp
). -
gb.inotify: Can’t find
sys/inotify.h
(should find it inglibc
). -
gb.v4l: Can’t find
png.h
,libpng.so
(should find them inlibpng-apng
),jpeglib.h
,libjpeg.so
(should find them inlibjpeg-turbo
) orlinux/videodev2.h
(should find it inlinux-headers
).
Some warnings are also printed about libiconv
, libintl
and sqlite2
, but these can be ignored. There are also warnings about not being able to find /usr/bin/file
; it’s not clear if this affects anything.
(The vast majority of the modules configure and build just fine… although whether they actually work is another question!)
The third (and final) outstanding problem is that, once the above is fixed, this needs to be installed as a split package (per upstream’s documentation). That’s probably a bit beyond my capabilities at present, which is why I didn’t plan to tackle it.
As this was a learning exercise, I don’t need to find a way to make the package work (which is why I didn’t file an issue) and I may not have scope to work further on it for awhile. So no comments are needed, but any comments will be greatfully received as I try to understand NixOS better .