-
-
Notifications
You must be signed in to change notification settings - Fork 15.2k
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
sile: 0.10.4 -> 0.10.9 #92152
sile: 0.10.4 -> 0.10.9 #92152
Conversation
Apply this diff on top of current changes to make CI happy: diff --git i/pkgs/tools/typesetting/sile/default.nix w/pkgs/tools/typesetting/sile/default.nix
index 1a5c780798f..3cef706da71 100644
--- i/pkgs/tools/typesetting/sile/default.nix
+++ w/pkgs/tools/typesetting/sile/default.nix
@@ -1,5 +1,5 @@
{ stdenv, darwin, fetchurl, makeWrapper, pkgconfig, autoconf, automake
-, harfbuzz, icu
+, harfbuzz, icu, poppler
, fontconfig, lua, libiconv
, makeFontsConf, gentium
}:
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "https://github.com/sile-typesetter/sile/releases/download/v${version}/${pname}-${version}.tar.bz2";
- sha256 = "a14fe23af242ba723aed699048b10abf60d1809390ac543140b80e057c4b4b9b";
+ sha256 = "16sb9dy0a3mq80qm9b4hjf0d2q5z1aqli439xlx75fj2y8xf4kx1";
};
configureFlags = [ "--with-system-luarocks" ]; |
Thanks for the tip @doronbehar. I did that and it helped, but I think there is still an issue. Even though the two tests that failed are somehow allowed to fail, they shouldn't have:
If poppler was available we should have had |
That's because pdfinfo is part of `poppler_utils` and not `poppler`. So change that and we'll see then.
|
Now I'm not sure what I'm looking at. Are the two skips / failures still meaningful? |
That error is due to a bad implementation of the way we split outputs to derivations. I once encountered similar frustrating errors that I had no idea where they came from or what line was the fault :/. Ideally though, such errors shouldn't arise. if we do try to enable split outputs, our build system passes to your configure script this flag:
Which points to where the docs should eventually go into. I think your configure script accepts this flag right? After debugging a bit, I reached the conclusion that the diff --git i/pkgs/tools/typesetting/sile/default.nix w/pkgs/tools/typesetting/sile/default.nix
index f003312493e..b01077258c2 100644
--- i/pkgs/tools/typesetting/sile/default.nix
+++ w/pkgs/tools/typesetting/sile/default.nix
@@ -55,13 +55,15 @@ stdenv.mkDerivation rec {
checkTarget = "check";
postInstall = ''
- install -D -t $out/share/doc/sile documentation/sile.pdf
+ install -D -t $doc/share/doc/sile documentation/sile.pdf
'';
# Hack to avoid TMPDIR in RPATHs.
- preFixup = ''rm -rf "$(pwd)" && mkdir "$(pwd)" '';
+ preFixup = ''
+ rm -rf "$(pwd)" && mkdir "$(pwd)"
+ '';
- outputs = [ "out" "doc" ];
+ outputs = [ "out" "man" "dev" "doc" ];
meta = {
description = "A typesetting system"; Usually we don't have upstream maintainers involved downstream and I appreciate that. Noticing this package doesn't have any downstream NixOS maintainers, perhaps (in addition to the diff above): diff --git i/pkgs/tools/typesetting/sile/default.nix w/pkgs/tools/typesetting/sile/default.nix
index b01077258c2..9514521e9ae 100644
--- i/pkgs/tools/typesetting/sile/default.nix
+++ w/pkgs/tools/typesetting/sile/default.nix
@@ -1,14 +1,38 @@
-{ stdenv, darwin, fetchurl, makeWrapper, pkgconfig, autoconf, automake
-, harfbuzz, icu, poppler_utils
-, fontconfig, lua, libiconv
-, makeFontsConf, gentium
+{ stdenv
+, darwin
+, fetchurl
+, makeWrapper
+, pkgconfig
+, autoconf
+, automake
+, harfbuzz
+, icu
+, poppler_utils
+, fontconfig
+, lua
+, libiconv
+, makeFontsConf
+, gentium
}:
-with stdenv.lib;
-
let
- luaEnv = lua.withPackages(ps: with ps;[cassowary cosmo compat53 linenoise lpeg lua-zlib lua_cliargs luaepnf luaexpat luafilesystem luarepl luasec luasocket stdlib vstruct]);
-
+ luaEnv = lua.withPackages(ps: with ps; [
+ cassowary
+ cosmo
+ compat53
+ linenoise
+ lpeg
+ lua-zlib
+ lua_cliargs
+ luaepnf
+ luaexpat
+ luafilesystem
+ luarepl
+ luasec
+ luasocket
+ stdlib
+ vstruct
+ ]);
in
stdenv.mkDerivation rec {
@@ -20,19 +44,36 @@ stdenv.mkDerivation rec {
sha256 = "16sb9dy0a3mq80qm9b4hjf0d2q5z1aqli439xlx75fj2y8xf4kx1";
};
- configureFlags = [ "--with-system-luarocks" ];
-
- nativeBuildInputs = [ autoconf automake pkgconfig makeWrapper ];
- buildInputs = [ harfbuzz icu fontconfig libiconv luaEnv ]
- ++ optional stdenv.isDarwin darwin.apple_sdk.frameworks.AppKit
+ configureFlags = [
+ "--with-system-luarocks"
+ ];
+
+ nativeBuildInputs = [
+ autoconf
+ automake
+ pkgconfig
+ makeWrapper
+ ];
+ buildInputs = [
+ harfbuzz
+ icu
+ fontconfig
+ libiconv
+ luaEnv
+ ]
+ ++ stdenv.lib.optionals stdenv.isDarwin [
+ darwin.apple_sdk.frameworks.AppKit
+ ]
;
- checkInputs = [ poppler_utils ];
+ checkInputs = [
+ poppler_utils
+ ];
- preConfigure = optionalString stdenv.isDarwin ''
+ preConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
sed -i -e 's|@import AppKit;|#import <AppKit/AppKit.h>|' src/macfonts.m
'';
- NIX_LDFLAGS = optionalString stdenv.isDarwin "-framework AppKit";
+ NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-framework AppKit";
FONTCONFIG_FILE = makeFontsConf {
fontDirectories = [
@@ -40,10 +81,7 @@ stdenv.mkDerivation rec {
];
};
- doCheck = true; /*stdenv.targetPlatform == stdenv.hostPlatform
- && ! stdenv.isAarch64 # random seg. faults
- && ! stdenv.isDarwin; # dy lib not found
- */
+ doCheck = true;
enableParallelBuilding = true;
@@ -65,7 +103,7 @@ stdenv.mkDerivation rec {
outputs = [ "out" "man" "dev" "doc" ];
- meta = {
+ meta = with stdenv.lib; {
description = "A typesetting system";
longDescription = ''
SILE is a typesetting system; its job is to produce beautiful This diff is mostly about style, so I hope you wouldn't care but I'll explain why I think this diff is good:
|
You are correct, that should be fixed: sile/issues/919.
Applied.
Also applied, thanks. By the way I squashed all that together in one commit, if you'd rather I broke it up by purpose I'd be happy to split it. |
All green. Ping me if there is anything else I need to do. |
/marvin opt-in |
SILE v0.10.7 is out now and has one change that will affect Nix packaging. As documented in v0.10.6 release notes there are new flags for |
You are an excellent developer. I have a few things to say:
https://repology.org/repositories/statistics/newest In order for sile to get updated automatically by the bot, (from experience it usually takes no more then a day or two), you need to use
The subtlety here is that this fetches a tarball from the commit referenced as
I wish it was possible for you to change a bit your releases procedure so that pure git sources could be used to build sile.
And add a line to sile's meta attribute (usually it's being put right below the homepage):
But that's no big deal, we could switch to automake1.15.
|
/marvin opt-in |
Hi! I'm an experimental bot. My goal is to guide this PR through its stages, hopefully ending with a merge. You can read up on the usage here. |
/status awaiting_changes |
Fair enough. Not all distros will even want the manual. The package is a lot lighter without the examples, and installed somewhere on the system where you can't modify and play with them they aren't that much use anyway. They make much more sense to have in the release packaging for people that are playing with the source.
This is something you (Nix) should fix. There is tons of software out there that release source packages for a good reason! SILE is hardly the only one in this situation. You actually can build SILE from the Github snapshot archive, but there are several disadvantages. To get it to work, you need to supply the version info:
Normally for Git clones that would be derived at configure time from git tag information or for source packages it is included in the package. It's impossible for the git zip archive that snapshots a commit to supply this information. The disadvantage is that there is a lot more building you will have to do. The distribution source package (made using automake's That being said the source package file naming is consistent, it should be quite straight forward to make this a regular feature of
This is because you didn't run the
Again, this is a catch 22 and a big deal for many software projects. Limiting yourself to git snapshots is not a good plan. You can work around this for SILE, but it's not the right solution.
Great, thanks!
I don't think this is correct, you can use a newer automake. The bits of automake source in the package used to be derived from 1.16 because that's what I was building from, but the new fully automated releases being built on Github Actions have bits from 1.15 because that's what the latest builder image they are running has. But it doesn't actually matter, you can use 1.16 just fine. Depending on how strict your default flags for automake are you make need to run |
How does one get the right checksum? It's not a regular SHA256 sum of the file. |
@doronbehar I invited you as a collaborator to my fork of this repository so you should be able to commit to this branch/PR. Please make yourself at home! And thanks for all the tips to date. The whole process actually has me interested in giving Nix a spin! |
@doronbehar I botched the automake install rules as they apply to the Docker image we build. The issue doesn't apply to the Nix build at all (it's a race condition while bundling all the Lua dependencies) but I'm going to be tagging yet another patch release, v0.10.8, to fix it soon. I don't think I'm wrong about the automake version stuff (i.e. I think you can build the source package without automake at all and from Git sources using automake1.16 if you want to) but if I'm wrong about that and there is something blocking it would be nice to fix before I tag another release. |
Thanks. I'll PR you there once I'll get something working.
We are not limited to pure git snapshots of course. Almost all standard GNU packages we ship are built from the releases that include a premade
Great. I tried building 0.10.7 with automake 1.15 and interestingly it failed with:
Ideally, release tarball should not need automake & autoconf at all, but it's not big deal that you do. Feel free to decide what ever you want for 0.10.8 and to ping me to test it. |
You don't need to PR anything, you have write access to the branch (sile-0.10.5) this PR is reading from, you can just push directly too it.
I'm a little surprised to hear this. I build it from git all the time, our CI system builds it from git, other distro packages have been known to build it from git, etc. There shouldn't be too much to it.
I just added hints about all this stuff to the output of
That's fine too, I'm happy with that flow if it works. I update Arch Linux AUR packages usually within minutes, repology picks them up by the next day.
This is still baffling to me. I'm testing with automake-1.16 locally and don't have this issue.
As far as I know, we already don't need automake to build the release tarballs, they come with the stuff automake puts in If there is something I'm doing wrong I'd be happy to fix it, I just don't see it yet.
I just pushed the bootstrap hints I mentioned and fixes for a several problems BSD builds were running into. If you get a chance to try building from master soon before I tag 0.10.8 then great, if not no big deal. P.S. The next release will have automake 1.16 artifacts because Github Actions have Focal images now so I updated from Bionic. |
I've bumped this to v0.10.9 (release notes). Nothing upstream really changes the build since v0.10.8. The major change is that Lua 5.4 is now supported. When the Nix supplied Lua and assorted LuaRocks are updated to 5.4 versions, building SILE against them shouldn't be any trouble. @doronbehar I think the automake version issues are fixed. It turns out we were bumping a timestamp that made the automake generated scripts that are in the dist package believe they needed to rebuild themselves. That shouldn't be happening hence it shouldn't even be checking versions (and automake isn't needed to build). |
Indeed. @alerque I've put all of our changes here in a more organized way (more commits and fixed some other issues) in a branch of mine. I hope you won't mind, but I'm opening a new PR with my version of the changes. Admittedly, our committers (me not included :)) most probably won't stumble upon this PR because it's too further down the flud of PRs we are constantly dealing with :). See further details on my PR at #94168 . |
I'm not quite sure why adding more PRs is the solution to drowning in PRs 🤷♂️, but I definitely appreciate the help getting this cleaned up and presentable! |
Motivation for this change
Upstream release
Note that I am not running Nix, this is in the blind. Prior to this release
make test
was a heavyweight test suite that downloaded a bunch of required fonts for regression testing. As of this release there is now a lightweightmake check
that just makes sure we can generate a valid PDF file, no fonts are downloaded. It does require poppler (forpdfinfo
) to run, so that may need to be added somewhere as a make dependency.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)