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
Gnome-latex: init at 3.28.1 #42325
Gnome-latex: init at 3.28.1 #42325
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking time to package this. Except for minor issues this looks quite good. One thing to consider, though, is how will the application find LaTeX tools and packages.
in stdenv.mkDerivation { | ||
name = "amtk-${version}"; | ||
src = fetchTarball { | ||
url = "https://gitlab.gnome.org/GNOME/amtk/-/archive/${version}/amtk-${version}.tar.bz2"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should probably use mirror://gnome/sources/amtk/${gnome3.versionBranch version}/${name}.tar.xz
, since it will be served by geographically distributed mirrors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also sorry about misinformation, we now have stdenv.lib.versions.majorMinor
which should be preferred.
|
||
configurePhase = '' | ||
mkdir -p $out | ||
./autogen.sh --prefix=$out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually, you would use preConfigure = ''NOCONFIGURE=1 ./autogen.sh'';
and let the generic builder take care of the rest.
''; | ||
|
||
meta = with stdenv.lib; { | ||
homepage = "https://wiki.gnome.org/Projects/Amtk"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to quote simple URLs.
gobjectIntrospection | ||
automake | ||
intltool | ||
gnome2.gtkdoc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use top-level gtk-doc
, this is just an alias.
sha256 = "17rbwg0v3m0myl797vrynk7wpz1fysp5px45bl7l4fpqwan2vgv8"; | ||
}; | ||
|
||
NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be reported as per #36468
''; | ||
|
||
preFixup = '' | ||
gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : $out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should already be a part of wrapGAppsHook
.
]; | ||
|
||
buildInputs = [ | ||
vala |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following should go to nativeBuildInputs
: vala, appstream-glib, gobjectIntrospection, gnome2.gtkdoc, gnome3.yelp-tools, itstool
mkdir -p $out | ||
./autogen.sh --prefix=$out --disable-Werror | ||
''; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add updateScripts as per #36150
mkdir -p $out | ||
./autogen.sh --prefix=$out | ||
''; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This package seems to have tests, could you add doCheck = true
(or doCheck = false
with a TODO comment if they fail).
I already discussed in with @Mic92 about the issue of finding Some other packages provide a |
two more things that worry me are these warnings:
Any idea what that means? |
The latter is caused by missing dconf service. You would need to add |
OK, thanks a lot for your help, your suggestions made this a whole lot cleaner (and apparently switching to the mirror got rid of the autotools dependency) |
sha256 = "1z481izrx057wraphnr82kxnpmmi8nvl7jswyylzm22kfs0mw402"; | ||
}; | ||
|
||
passthru.updateScript = gnome3.updateScript { packageName = pname; }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move this down before meta? We are trying to structure the expressions so that building instructions are first and meta things are last.
passthru.updateScript = gnome3.updateScript { packageName = pname; }; | ||
|
||
nativeBuildInputs = [ | ||
amtk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these be in native inputs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't know the difference between buildInputs
and nativeBuildInputs
... i can try shuffling them around but it seems to build either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The difference occurs during cross-compilation. nativeBuildInputs
use the architecture of the builder (build platform), while buildInputs
use the architecture of the host platform (the one the resulting program will be run). That means programs run during build (build managers, compilers, asset generators) need to go to nativeBuildInputs
.
]; | ||
|
||
doCheck = false; | ||
# TODO: seems like tests need a display: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe running those in xvfb would help:
xvfb-run -s '-screen 0 800x600x24' dbus-run-session \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems to fail with this:
FAIL: test-file-metadata
========================
/file/get_set_metadata: OK
/file/load_save_metadata_sync:
(./test-file-metadata:20931): Tepl-WARNING **: 14:41:36.942: GVfs metadata is not supported. Fallback to TeplMetadataManager. Either GVfs is not correctly installed or GVfs metadata are not supported on this platform. In the latter case, you should configure Tepl with --disable-gvfs-metadata.
FAIL test-file-metadata (exit status: 133)
I'll try to find a solution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
amtk
tests work with this trick though, so that's also nice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are building on tmpfs so some file attributes might not work. Probably nothing we can do about it.
homepage = https://wiki.gnome.org/Projects/Amtk; | ||
description = "Actions, Menus and Toolbars Kit for GTK+ applications"; | ||
maintainers = [ maintainers.manveru ]; | ||
license = licenses.lgpl21; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be lgpl21Plus: https://gitlab.gnome.org/GNOME/amtk/blob/master/amtk/amtk-action-map.c#L8
The COPYING file usually contains only the text of the lower bound, since including the text of later versions is not possible.
I think that's about all I can fix... couldn't make 100% sure the |
|
||
buildInputs = with gnome3; [ | ||
amtk | ||
dconf.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you specifically requesting dconf.dev
? Actually, we should probably build with --disable-dconf-migration
as we did not have the package before so there are no old GSettings paths to migrate.
]; | ||
|
||
buildInputs = [ | ||
dbus.daemon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would go to nativeBuildInputs
, as dbus-run-session
is run by the build platform. Also the binary is not part of dbus.daemon
but dbus
.
|
||
buildInputs = [ | ||
dbus.daemon | ||
gnome3.gtk.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why specifically request dev output?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I found when looking for the missing file using nix-locate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we usually do not use dev
outputs, since this will probably also use a library that will be in a different output (out
). It works because the builder somehow inserts other outputs as well or something.
name = "${pname}-${version}"; | ||
|
||
src = fetchurl { | ||
url = "mirror://gnome/sources/${pname}/${gnome3.versionBranch version}/${pname}-${version}.tar.xz"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about misinformation, we now have stdenv.lib.versions.majorMinor
which should be preferred.
passthru.updateScript = gnome3.updateScript { packageName = pname; }; | ||
|
||
meta = with stdenv.lib; { | ||
homepage = "https://wiki.gnome.org/Apps/GNOME-LaTeX"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove quotes here as well.
One more update ;) |
Motivation for this change
Package request in #42261
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)