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

pdftag: init at 1.0.4 #45666

Merged
merged 1 commit into from Sep 11, 2018
Merged

pdftag: init at 1.0.4 #45666

merged 1 commit into from Sep 11, 2018

Conversation

leenaars
Copy link
Contributor

@leenaars leenaars commented Aug 27, 2018

Motivation for this change

User friendly tool for editing metadata was still missing.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

sha256 = "17zk42h0n33b4p8fqlq2riqwcdi8y9m5n0ccydnk6a4x8rli97b3";
};

nativeBuildInputs = [ pkgconfig meson ninja gtk3 poppler wrapGAppsHook ];
Copy link
Contributor

Choose a reason for hiding this comment

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

gtk3 and poppler should go to buildInputs, since they need to match the user’s architecture.

};

nativeBuildInputs = [ pkgconfig meson ninja gtk3 poppler wrapGAppsHook ];
buildInputs = [ vala ];
Copy link
Contributor

Choose a reason for hiding this comment

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

vala on the other hand needs to run on the builder thus it should go to nativeBuildInputs.

buildInputs = [ vala ];

patchPhase = ''substituteInPlace meson.build \
--replace "install_dir: '/usr" "install_dir: '$out"
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you open a bug upstream about this and add a comment linking it here?

--replace "install_dir: '/usr" "install_dir: '$out"
'';

preInstall = "mkdir -p $out/share/licenses/${pname}";
Copy link
Contributor

Choose a reason for hiding this comment

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

I think installing licenses is Debianism. Maybe asking upstream about disabling this might be even more important than changing the path.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jtojnar: I filed an issue upstream. Note that in some cases the license text has to be distributed alongside the rest as part of the license itself. Installing it in $prefix seems a sane way to go.

@xeji
Copy link
Contributor

xeji commented Sep 1, 2018

@GrahamcOfBorg build pdftag

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: pdftag

Partial log (click to expand)

Installing /build/source/data/pdftag.desktop to /nix/store/170lizr2c3pbk7yzk7x3pj7vixkgwvl1-pdftag-1.0.4/share/applications
glibPreFixupPhase
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/170lizr2c3pbk7yzk7x3pj7vixkgwvl1-pdftag-1.0.4
shrinking /nix/store/170lizr2c3pbk7yzk7x3pj7vixkgwvl1-pdftag-1.0.4/bin/pdftag
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/170lizr2c3pbk7yzk7x3pj7vixkgwvl1-pdftag-1.0.4/bin
patching script interpreter paths in /nix/store/170lizr2c3pbk7yzk7x3pj7vixkgwvl1-pdftag-1.0.4
checking for references to /build in /nix/store/170lizr2c3pbk7yzk7x3pj7vixkgwvl1-pdftag-1.0.4...
/nix/store/170lizr2c3pbk7yzk7x3pj7vixkgwvl1-pdftag-1.0.4

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: pdftag

Partial log (click to expand)

Installing /build/source/data/pdftag.desktop to /nix/store/qxzysd7g9kwm600njl1zgg14452w1cx6-pdftag-1.0.4/share/applications
glibPreFixupPhase
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/qxzysd7g9kwm600njl1zgg14452w1cx6-pdftag-1.0.4
shrinking /nix/store/qxzysd7g9kwm600njl1zgg14452w1cx6-pdftag-1.0.4/bin/pdftag
strip is /nix/store/y4ymnvgxygpq05h03kyzbj572zmh6zla-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/qxzysd7g9kwm600njl1zgg14452w1cx6-pdftag-1.0.4/bin
patching script interpreter paths in /nix/store/qxzysd7g9kwm600njl1zgg14452w1cx6-pdftag-1.0.4
checking for references to /build in /nix/store/qxzysd7g9kwm600njl1zgg14452w1cx6-pdftag-1.0.4...
/nix/store/qxzysd7g9kwm600njl1zgg14452w1cx6-pdftag-1.0.4

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: pdftag

Partial log (click to expand)

[0/1] Installing files.
Installing pdftag to /nix/store/hzipmvypcsnmgkw21rdcvjjvglj83phd-pdftag-1.0.4/bin/pdftag
Installing /private/tmp/nix-build-pdftag-1.0.4.drv-0/source/LICENSE to /nix/store/hzipmvypcsnmgkw21rdcvjjvglj83phd-pdftag-1.0.4/share/licenses/pdftag
Installing /private/tmp/nix-build-pdftag-1.0.4.drv-0/source/data/pdftag.desktop to /nix/store/hzipmvypcsnmgkw21rdcvjjvglj83phd-pdftag-1.0.4/share/applications
glibPreFixupPhase
post-installation fixup
strip is /nix/store/df6k4mgdjxciy0f637lryp7c9ln7n1m3-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/hzipmvypcsnmgkw21rdcvjjvglj83phd-pdftag-1.0.4/bin
patching script interpreter paths in /nix/store/hzipmvypcsnmgkw21rdcvjjvglj83phd-pdftag-1.0.4
/nix/store/hzipmvypcsnmgkw21rdcvjjvglj83phd-pdftag-1.0.4

@xeji
Copy link
Contributor

xeji commented Sep 1, 2018

When I install this with nix-env, it runs but the icons are missing (I do have hicolor-icon-theme installed), and if I click any button it crashes with

(pdftag:2713): GLib-GIO-CRITICAL **: 12:39:19.985: g_app_info_get_name: assertion 'G_IS_APP_INFO (appinfo)' failed
(pdftag:2713): GLib-GIO-ERROR **: 12:39:21.963: No GSettings schemas are installed on the system

Not sure if it is a bug in this package, or just a defective setup on my system.

@jtojnar
Copy link
Contributor

jtojnar commented Sep 1, 2018

Looks like wrapGAppsHook is missing from nativeBuildInputs. Also hicolor-icon-theme does not contain any actual icons, you need to install a real theme like Adwaita.

@leenaars leenaars force-pushed the pdftag branch 2 times, most recently from a0cfea6 to 6244791 Compare September 2, 2018 20:33
@leenaars
Copy link
Contributor Author

leenaars commented Sep 7, 2018

@xeji: I followed @jtojnar suggestion, and added wrapGAppsHook and Adwaita. Does it work for you now?

@leenaars leenaars force-pushed the pdftag branch 2 times, most recently from 0b2f68a to 2bd0eb0 Compare September 7, 2018 20:48
@jtojnar
Copy link
Contributor

jtojnar commented Sep 7, 2018

Icon themes like Adwaita should not be added to most packages, instead they should be installed by the user.

@xeji
Copy link
Contributor

xeji commented Sep 7, 2018

Just tried it, works for me now. If you remove Adwaita this should be ready.

@leenaars
Copy link
Contributor Author

leenaars commented Sep 8, 2018

@xeji: Okay, removed Adwaita.

@xeji
Copy link
Contributor

xeji commented Sep 8, 2018

@GrahamcOfBorg build pdftag

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: pdftag

Partial log (click to expand)

glibPreFixupPhase
post-installation fixup
Wrapping program /nix/store/zncj3p1jhh64lnzy6am0zy63xpd0k7zi-pdftag-1.0.4/bin/pdftag
shrinking RPATHs of ELF executables and libraries in /nix/store/zncj3p1jhh64lnzy6am0zy63xpd0k7zi-pdftag-1.0.4
shrinking /nix/store/zncj3p1jhh64lnzy6am0zy63xpd0k7zi-pdftag-1.0.4/bin/.pdftag-wrapped
strip is /nix/store/y4ymnvgxygpq05h03kyzbj572zmh6zla-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/zncj3p1jhh64lnzy6am0zy63xpd0k7zi-pdftag-1.0.4/bin
patching script interpreter paths in /nix/store/zncj3p1jhh64lnzy6am0zy63xpd0k7zi-pdftag-1.0.4
checking for references to /build in /nix/store/zncj3p1jhh64lnzy6am0zy63xpd0k7zi-pdftag-1.0.4...
/nix/store/zncj3p1jhh64lnzy6am0zy63xpd0k7zi-pdftag-1.0.4

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: pdftag

Partial log (click to expand)

glibPreFixupPhase
post-installation fixup
Wrapping program /nix/store/74a1yhs8bk561gxpxjbfxn9zqqkhp8z4-pdftag-1.0.4/bin/pdftag
shrinking RPATHs of ELF executables and libraries in /nix/store/74a1yhs8bk561gxpxjbfxn9zqqkhp8z4-pdftag-1.0.4
shrinking /nix/store/74a1yhs8bk561gxpxjbfxn9zqqkhp8z4-pdftag-1.0.4/bin/.pdftag-wrapped
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/74a1yhs8bk561gxpxjbfxn9zqqkhp8z4-pdftag-1.0.4/bin
patching script interpreter paths in /nix/store/74a1yhs8bk561gxpxjbfxn9zqqkhp8z4-pdftag-1.0.4
checking for references to /build in /nix/store/74a1yhs8bk561gxpxjbfxn9zqqkhp8z4-pdftag-1.0.4...
/nix/store/74a1yhs8bk561gxpxjbfxn9zqqkhp8z4-pdftag-1.0.4

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: pdftag

Partial log (click to expand)

Installing pdftag to /nix/store/jnml1mr4s6mpgdr4y6a4kn56gl4lfpqx-pdftag-1.0.4/bin/pdftag
Installing /private/tmp/nix-build-pdftag-1.0.4.drv-0/source/LICENSE to /nix/store/jnml1mr4s6mpgdr4y6a4kn56gl4lfpqx-pdftag-1.0.4/share/licenses/pdftag
Installing /private/tmp/nix-build-pdftag-1.0.4.drv-0/source/data/pdftag.desktop to /nix/store/jnml1mr4s6mpgdr4y6a4kn56gl4lfpqx-pdftag-1.0.4/share/applications
glibPreFixupPhase
post-installation fixup
Wrapping program /nix/store/jnml1mr4s6mpgdr4y6a4kn56gl4lfpqx-pdftag-1.0.4/bin/pdftag
strip is /nix/store/df6k4mgdjxciy0f637lryp7c9ln7n1m3-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/jnml1mr4s6mpgdr4y6a4kn56gl4lfpqx-pdftag-1.0.4/bin
patching script interpreter paths in /nix/store/jnml1mr4s6mpgdr4y6a4kn56gl4lfpqx-pdftag-1.0.4
/nix/store/jnml1mr4s6mpgdr4y6a4kn56gl4lfpqx-pdftag-1.0.4

@xeji xeji merged commit 28ef512 into NixOS:master Sep 11, 2018
@arrufat
Copy link

arrufat commented Sep 13, 2018

I've fixed the issue upstream, please let me know if there's anything else I should do.
Thanks for showing interest in pdftag :)

@leenaars
Copy link
Contributor Author

@arrufat: Thanks a lot for your kind response and understanding!

Note that you seem to have made a small change to the semantics of the release tag, you now include the letter v before the number... (previous ones were 1.0.3, 1.0.2, 1.0.1, now you have v1.0.5). Automatic scripts cannot update such changes, so it would be good to be consistent with future releases...

};

nativeBuildInputs = [ pkgconfig meson ninja wrapGAppsHook ];
buildInputs = [ gtk3 poppler vala ];
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, vala should have gone to nativeBuildInputs as well.

Copy link
Contributor Author

@leenaars leenaars Sep 13, 2018

Choose a reason for hiding this comment

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

@jtojnar: Update with that + 1.0.5: #46633 as a new pull request as this one is closed.

@leenaars
Copy link
Contributor Author

(note that I'm personally in favor of just numbers, as this is easier for packagers)

@leenaars leenaars mentioned this pull request Sep 13, 2018
9 tasks
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

5 participants