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

tikzit: init at 2.0 #48479

Merged
merged 9 commits into from Oct 25, 2018
Merged

tikzit: init at 2.0 #48479

merged 9 commits into from Oct 25, 2018

Conversation

iblech
Copy link
Contributor

@iblech iblech commented Oct 15, 2018

Motivation for this change

tikzit is a graphical editor for TikZ diagrams (for inclusion in LaTeX files). This pull requests adds tikzit to our repository.

The current version of tikzit is 2.0-rc2. I suggest we wait for 2.0 to be released before including tikzit in nixpkgs, to reduce clutter.

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.

@iblech
Copy link
Contributor Author

iblech commented Oct 16, 2018

Thank you, Merlin!

TikZiT is indeed GPL3 Plus. The website doesn't communicate this clearly (a fix is already in the making), but the source code comments clearly state so.

@iblech
Copy link
Contributor Author

iblech commented Oct 18, 2018

Dear @mgttlinger, there just was a commit on the TikZiT repository changing the behavior of make install. This might affect our Nix build.

I don't have time right now to look into this, but will do so on the weekend. In case you want to go ahead right now, feel free to do so, of course.

@mgttlinger
Copy link
Member

@iblech Given that we target the released version the new commit won't be in the version we pull, but we should definitely look into that for the next release.

@iblech
Copy link
Contributor Author

iblech commented Oct 21, 2018

@mgttlinger I'm happy to report that we don't need our preBuild kludge anymore; just setting the PREFIX variable is enough.

@mgttlinger
Copy link
Member

@iblech That's great, now the build looks really clean. Should we remove the "do not merge" from the title?

@iblech
Copy link
Contributor Author

iblech commented Oct 23, 2018

I just pushed the necessary changes to that we target the just-released version 2.0.

@mgttlinger, it was a pleasure collaborating with you on this build! :-)

Dear committers, this pull request is no longer work in progress. Please consider it for merging.

@iblech iblech changed the title tikzit: init at 2.0-rc2 (WIP, do not merge yet) tikzit: init at 2.0 Oct 23, 2018
Copy link
Contributor

@c0bw3b c0bw3b left a comment

Choose a reason for hiding this comment

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

Also consider:

  • adding enableParallelBuilding = true; after checking it doesn't break the build

  • there seems to be unit tests available (not sure) :

  doCheck = true;
  checkTarget = "test";

can be included directly in papers typeset using LaTeX.
'';
homepage = https://tikzit.github.io/;
license = stdenv.lib.licenses.gpl3Plus;
Copy link
Contributor

Choose a reason for hiding this comment

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

licenses.gpl3Plus is enough since you have with stdenv.lib; at the opening of your meta block

'';
homepage = https://tikzit.github.io/;
license = stdenv.lib.licenses.gpl3Plus;
platforms = stdenv.lib.platforms.all;
Copy link
Contributor

Choose a reason for hiding this comment

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

Same reason: platforms.all

By the way, have you been able to test the build on Darwin/macOS ?

@mgttlinger
Copy link
Member

About the tests: a make target test doesn't seem to exist. I can look into that later.

@mgttlinger
Copy link
Member

Ok, so the make target is the default check but it doesn't seem to actually check anything

make: Nothing to be done for 'check'.

@c0bw3b
Copy link
Contributor

c0bw3b commented Oct 25, 2018

Bah no worries, checks are not mandatory per se.
I just thought maybe there was some and that we could run them, but if it's not applicable to this package we'll live without it. :)

On the platforms topic : has one of you been able to test the build on macOS?

@c0bw3b
Copy link
Contributor

c0bw3b commented Oct 25, 2018

@GrahamcOfBorg build tikzit

@mgttlinger
Copy link
Member

@c0bw3b There seem to be tests if you look at the end of the tikzit.pro file but I am unsure how to activate them. I have neither a Mac nor a Win machine at hand for testing. Don't know about @iblech.

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: tikzit

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/73lczdqv3k7wbbq4j5r62w07627pi0hw-tikzit-2.0
shrinking /nix/store/73lczdqv3k7wbbq4j5r62w07627pi0hw-tikzit-2.0/bin/tikzit
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/73lczdqv3k7wbbq4j5r62w07627pi0hw-tikzit-2.0/bin
patching script interpreter paths in /nix/store/73lczdqv3k7wbbq4j5r62w07627pi0hw-tikzit-2.0
checking for references to /build in /nix/store/73lczdqv3k7wbbq4j5r62w07627pi0hw-tikzit-2.0...
postPatchMkspecs
postPatchMkspecs
/nix/store/73lczdqv3k7wbbq4j5r62w07627pi0hw-tikzit-2.0

@iblech
Copy link
Contributor Author

iblech commented Oct 25, 2018

Thank you for the feedback, @c0bw3b, and thank you for implementing the improvements, @mgttlinger!

I also can't test on Mac or Win, and I also didn't figure out how to activate the tests. The project description file tikzit.pro does have a conditional clause for making the resulting Makefile build the test suite, but I failed to find out how to activate this flag. No target of the standard Makefile generated by qmake will compile the test suite, hence in my understanding the make check doesn't actually do anything.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: tikzit

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/vyaq1x6kgkz5ksgw0dqjaayxh4qbld82-tikzit-2.0
shrinking /nix/store/vyaq1x6kgkz5ksgw0dqjaayxh4qbld82-tikzit-2.0/bin/tikzit
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/vyaq1x6kgkz5ksgw0dqjaayxh4qbld82-tikzit-2.0/bin
patching script interpreter paths in /nix/store/vyaq1x6kgkz5ksgw0dqjaayxh4qbld82-tikzit-2.0
checking for references to /build in /nix/store/vyaq1x6kgkz5ksgw0dqjaayxh4qbld82-tikzit-2.0...
postPatchMkspecs
postPatchMkspecs
/nix/store/vyaq1x6kgkz5ksgw0dqjaayxh4qbld82-tikzit-2.0

@mgttlinger
Copy link
Member

Note that the travis config in the upstream repo doesn't run those tests either (it seems) so no idea how "maintained" they are anyway.

@c0bw3b
Copy link
Contributor

c0bw3b commented Oct 25, 2018

Should be fine, upstream doesn't document special steps for building on Darwin.
Win is out of scope. Nix mostly targets x64 Linux, aarch64 (ARMv8) and Darwin (macOS)

@c0bw3b c0bw3b merged commit 2595be0 into NixOS:master Oct 25, 2018
coreyoconnor pushed a commit to coreyoconnor/nixpkgs that referenced this pull request Oct 26, 2018
* tikzit: init at 2.0

* tikzit: Parallel building and qualification
@symphorien symphorien mentioned this pull request Oct 29, 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

4 participants