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

libhttpseverywhere: 0.4.5 -> 0.6.5 #30352

Merged
merged 1 commit into from Dec 29, 2017
Merged

Conversation

sternenseemann
Copy link
Member

Motivation for this change

Update libhttpseverywhere to the latest version including support for the updated ruleset format.
Prior version's ruleset update funtionality ceased to work.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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/)
  • Fits CONTRIBUTING.md.

version = "${major}.${minor}";

name = "libhttpseverywhere-${version}";

src = fetchurl {
url = "mirror://gnome/sources/libhttpseverywhere/${major}/libhttpseverywhere-${version}.tar.xz";
sha256 = "07sgcw285rl9wqr5k7srs3fj7fhgrrw6w780jx8wy8jw2bfwlvj2";
sha256 = "0pwnh5mbbcb9hpx7by5f5j5qj7kchflwx7dzh49hbkw1jvwrx655";
};

nativeBuildInputs = [ gnome3.vala valadoc gobjectIntrospection meson ninja pkgconfig ];
buildInputs = [ glib gnome3.libgee libxml2 json_glib libsoup libarchive ];
Copy link
Contributor

Choose a reason for hiding this comment

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

0.6.1 apparently dropped dependency on libxml2: https://github.com/GNOME/libhttpseverywhere/releases/tag/0.6.1

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks! Fixed.

};

nativeBuildInputs = [ gnome3.vala valadoc gobjectIntrospection meson ninja pkgconfig ];
buildInputs = [ glib gnome3.libgee libxml2 json_glib libsoup libarchive ];

mesonFlags = "-Denable_valadoc=true";
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be better to move the documentation to devdoc output but it would require patching meson.build

Copy link
Member Author

Choose a reason for hiding this comment

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

Is this a convention of nixpkgs? If so, I didn't know. Patched the build file.

- install_subdir(meson.current_build_dir()+'/devhelp/httpseverywhere-'+api+'/httpseverywhere-'+api,
- install_dir: get_option('datadir')+'/devhelp/books')
+ install_subdir(meson.current_build_dir()+'/devdoc/httpseverywhere-'+api+'/httpseverywhere-'+api,
+ install_dir: get_option('datadir')+'/devdoc/books')
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 we just want install_dir to be join_paths(get_variable('devdoc'), get_option('datadir'), 'devhelp', 'books') or something. Changing the output or command is not necessary.

You should also add outputs = [ "out" "devdoc" ]; to the Nix expression for the derivation to be multi-output.

Copy link
Member Author

Choose a reason for hiding this comment

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

get_variable does not do, what we want here. There seems to be no possibility to access environment variables in meson, somehow. Any pointers or ideas?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, apparently meson does not offer access to env vars: mesonbuild/meson#9

For now we should probably just add the outputs attribute and move share/devhelp/books to $devdoc in the setup hook.

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay, all done now, I think!


doCheck = true;

checkPhase = "./httpseverywhere_test";

outputs = [ "out" "devdoc" ];

fixupPhase = ''
Copy link
Contributor

Choose a reason for hiding this comment

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

The files should be in the same relative path. You can replace the whole fixupPhase with moveToOutput share/devhelp/books $devdoc but it would be best to put it in the setuphook.

Copy link
Member Author

Choose a reason for hiding this comment

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

how do I put it in there? I don't really get, how the setup-hook works yet.

Copy link
Contributor

Choose a reason for hiding this comment

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

Just add the line to pkgs/build-support/setup-hooks/multiple-outputs.sh, specifically the _multioutDocs function. It should be called automatically when the outputs attribute is present.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@jtojnar jtojnar Oct 30, 2017

Choose a reason for hiding this comment

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

If I understand it correctly, the REMOVE case is for when outputs attribute does not contain devdoc.

Copy link
Member

Choose a reason for hiding this comment

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

Right. _overrideFirst outputDevdoc "devdoc" REMOVE means that developer docs are moved to $devdoc if it exists and removed otherwise.

Copy link
Contributor

Choose a reason for hiding this comment

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

@sternenseemann The fix is now in nixos-unstable. If you rebase, you no longer need the fixupPhase.

@jtojnar jtojnar added this to To Do in GNOME Nov 25, 2017
@jtojnar jtojnar moved this from To Do to In Progress in GNOME Nov 29, 2017
major = "0.4";
minor = "5";
major = "0.6";
minor = "1";
Copy link
Contributor

Choose a reason for hiding this comment

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

0.6.4 was released.

@@ -1,24 +1,33 @@
{stdenv, fetchurl, gnome3, glib, json_glib, libxml2, libarchive, libsoup, gobjectIntrospection, meson, ninja, pkgconfig, valadoc}:
{stdenv, fetchurl, gnome3, glib, json_glib, libarchive, libsoup, gobjectIntrospection, meson, ninja, pkgconfig, valadoc}:
Copy link
Contributor

Choose a reason for hiding this comment

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

valadoc can be removed, it is part of vala now.

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 isn't?!

Copy link
Contributor

Choose a reason for hiding this comment

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

Since Vala 0.38.0

@sternenseemann
Copy link
Member Author

@jtojnar everything should be okay now.

@Profpatsch
Copy link
Member

Cheers!

@Profpatsch Profpatsch merged commit 019c631 into NixOS:master Dec 29, 2017
GNOME automation moved this from In Progress to Done Dec 29, 2017
@jtojnar
Copy link
Contributor

jtojnar commented Dec 29, 2017

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
GNOME
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants