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

doxyrest: init at master #98449

Closed
wants to merge 1 commit into from
Closed

doxyrest: init at master #98449

wants to merge 1 commit into from

Conversation

HaoZeke
Copy link
Member

@HaoZeke HaoZeke commented Sep 22, 2020

Motivation for this change

Initialized a new package.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Contributor

@doronbehar doronbehar left a comment

Choose a reason for hiding this comment

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

What is the usecase of this package?

# Somehow fetchFromGithub was ignoring submodules
src = fetchgit {
url = "https://github.com/vovkos/doxyrest_b";
rev = "3500bc0101c5ebe4921d8cca49b42e209e761971";
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

It's much too old. A lot of fixes have been put in master since then.

Copy link
Member Author

Choose a reason for hiding this comment

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

To be clearer, the current setup corresponds to https://github.com/vovkos/doxyrest/releases/tag/doxyrest-2.1.0

It's just that the build repo doesn't release the same way (since it is updated with each push).

fetchSubmodules = true;
};

nativeBuildInputs = [ expat lua5 ragelDev which cmake ];
Copy link
Contributor

Choose a reason for hiding this comment

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

What does expat and lua5 are used for? I'm asking because I'm rather sure they belong to buildInputs.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure, lua is used for the configuration of the doxyrest binary, and expat is also used by the binary to read in XML files. Should they then belong in buildInputs?

hardeningDisable = [ "format" ];

meta = with stdenv.lib; {
description = "A compiler from Doxygen XML to reStructuredText";
Copy link
Contributor

Choose a reason for hiding this comment

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

Upstream says:

This is a repository bundle (Doxyrest + AXL). With this bundle you can conveniently build Doxyrest and all the libraries it depends on -- in correct order and from the single source tree.

Sounds like they try to solve a problem Nix already does.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's actually the build repo for https://github.com/vovkos/doxyrest
I guess in a sense it might be better to add a package for each sub-module and then finally open one for this package, but it seemed like an over-exuberant response at the moment, since I can find no (obvious) other use-cases for the submodules.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. What happens when you try to build from https://github.com/vovkos/doxyrest directly?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nothing much, except it would require building each submodule at the commit referenced in the build directory. I could probably set that up over the weekend, shouldn't be hard, they seem to be cmake build stuff.

Copy link
Contributor

Choose a reason for hiding this comment

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

The fact they "recommend" building with a totally separate repo might be suitable for users of other distros, but not for NixOS IMO. I think you should create derivations for each such submodule dependency, and try to tell the builder to use the "system"'s dependencies. See similar discussion at #91930 (comment) .

Copy link
Member Author

Choose a reason for hiding this comment

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

That kind of defeats the purpose of having fetchSubmodules as an option for fetchgit then, would it not?

Copy link
Member Author

Choose a reason for hiding this comment

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

I do not believe it makes sense to manually track the build repo (by checking which commits the submodules are pinned to) every time, just because "it feels more Nix like". There are reasons why we have support for fetchSubmodules and this is a good example IMO.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not against the usage of fetchSubmodules. I just think that the submodules should be exposed as Nix derivations, because yes, someone may find use to them in the future, and if they produce shared libraries they should be shared in the Nix Store.

by checking which commits the submodules are pinned to) every time

You could write an updateScript, that will fetch the matching commits of these submodules, given a rev of the main repo, and then write a json / Nix file that will be used by the expression of https://github.com/vovkos/doxyrest .

meta = with stdenv.lib; {
description = "A compiler from Doxygen XML to reStructuredText";
longDescription =
"A compiler from Doxygen XML to reStructuredText -- hence, the name. It parses XML databases generated by Doxygen and produces reStructuredText for the Python documentation generator Sphinx.";
Copy link
Contributor

Choose a reason for hiding this comment

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

Again, upstream says differently.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's because the output of this build is the doxyrest binary, which is what we need, and so the description is from this: https://github.com/vovkos/doxyrest

The build repo referenced is just to streamline building doxyrest.

@HaoZeke
Copy link
Member Author

HaoZeke commented Sep 22, 2020

What is the usecase of this package?

It basically parses Doxygen XML files to RST.

# otherwise "cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security]"
hardeningDisable = [ "format" ];

meta = with stdenv.lib; {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
meta = with stdenv.lib; {
meta = with lib; {

@@ -10957,6 +10957,8 @@ in
inherit (darwin.apple_sdk.frameworks) CoreServices;
};

doxyrest = callPackage ../development/tools/documentation/doxyrest {};
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
doxyrest = callPackage ../development/tools/documentation/doxyrest {};
doxyrest = callPackage ../development/tools/documentation/doxyrest { };

@stale
Copy link

stale bot commented Jul 21, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 21, 2021
@doronbehar
Copy link
Contributor

@HaoZeke would you like to revisit this package init with the latest release from upstream (2.1.2) ? And resolve the merge conflicts?

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 22, 2021
@HaoZeke
Copy link
Member Author

HaoZeke commented Jul 22, 2021

@HaoZeke would you like to revisit this package init with the latest release from upstream (2.1.2) ? And resolve the merge conflicts?

Absolutely, sorry for letting this go stale.

@stale
Copy link

stale bot commented Apr 19, 2022

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Apr 19, 2022
@doronbehar
Copy link
Contributor

Closing due to merge conflict and no response from OP.

@doronbehar doronbehar closed this Apr 19, 2022
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

3 participants