1{ lib, stdenv, fetchurl, pkg-config, meson, ninja, makeFontsConf, vala, fetchpatch
2, gnome, libgee, glib, json-glib, libarchive, libsoup, gobject-introspection }:
3
4let
5 pname = "libhttpseverywhere";
6 version = "0.8.3";
7in stdenv.mkDerivation rec {
8 name = "${pname}-${version}";
9
10 src = fetchurl {
11 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${name}.tar.xz";
12 sha256 = "1jmn6i4vsm89q1axlq4ajqkzqmlmjaml9xhw3h9jnal46db6y00w";
13 };
14
15 nativeBuildInputs = [ vala gobject-introspection meson ninja pkg-config ];
16 buildInputs = [ glib libgee json-glib libsoup libarchive ];
17
18 patches = [
19 # Fixes build with vala >=0.42
20 (fetchpatch {
21 url = "https://gitlab.gnome.org/GNOME/libhttpseverywhere/commit/6da08ef1ade9ea267cecf14dd5cb2c3e6e5e50cb.patch";
22 sha256 = "1nwjlh8iqgjayccwdh0fbpq2g1h8bg1k1g9i324f2bhhvyhmpq8f";
23 })
24 # fix build with meson 0.60
25 (fetchpatch {
26 url = "https://gitlab.gnome.org/GNOME/libhttpseverywhere/-/commit/4c38b2ca25802c464f3204a62815201d8cf549fd.patch";
27 sha256 = "sha256-1+fmR0bpvJ9ISN2Hr+BTIQz+Bf6VfY1RdVZ/OohUlWU=";
28 })
29 ];
30
31 mesonFlags = [ "-Denable_valadoc=true" ];
32
33 doCheck = true;
34
35 checkPhase = "(cd test && ./httpseverywhere_test)";
36
37 FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ ]; };
38
39 outputs = [ "out" "devdoc" ];
40
41 passthru = {
42 updateScript = gnome.updateScript {
43 packageName = pname;
44 versionPolicy = "odd-unstable";
45 };
46 };
47
48 meta = with lib; {
49 description = "Library to use HTTPSEverywhere in desktop applications";
50 homepage = "https://gitlab.gnome.org/GNOME/libhttpseverywhere";
51 license = licenses.lgpl3;
52 platforms = platforms.linux;
53 maintainers = with maintainers; [ sternenseemann ] ++ teams.gnome.members;
54 };
55}