about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/applications/networking/feedreaders/gnome-feeds/default.nix89
-rw-r--r--pkgs/applications/networking/feedreaders/gnome-feeds/listparser.nix33
-rw-r--r--pkgs/by-name/gn/gnome-feeds/package.nix95
-rw-r--r--pkgs/by-name/sy/syndication-domination/package.nix55
-rw-r--r--pkgs/top-level/all-packages.nix2
-rw-r--r--pkgs/top-level/python-packages.nix5
6 files changed, 155 insertions, 124 deletions
diff --git a/pkgs/applications/networking/feedreaders/gnome-feeds/default.nix b/pkgs/applications/networking/feedreaders/gnome-feeds/default.nix
deleted file mode 100644
index def8bfb515200..0000000000000
--- a/pkgs/applications/networking/feedreaders/gnome-feeds/default.nix
+++ /dev/null
@@ -1,89 +0,0 @@
-{ lib
-, callPackage
-
-, fetchFromGitLab
-
-, appstream
-, gobject-introspection
-, meson
-, ninja
-, pkg-config
-, wrapGAppsHook3
-
-, glib
-, glib-networking
-, gtk3
-, libhandy
-, listparser ? callPackage ./listparser.nix { }
-, webkitgtk
-, python3
-}:
-
-python3.pkgs.buildPythonApplication rec {
-  pname = "gnome-feeds";
-  version = "0.16.2";
-
-  src = fetchFromGitLab {
-    domain = "gitlab.gnome.org";
-    owner = "World";
-    repo = "gfeeds";
-    rev = version;
-    sha256 = "sha256-66dwVR9owg050aHCHJek7jYnT+/yyCKo4AaUE0hCqBA=";
-  };
-
-  format = "other";
-
-  nativeBuildInputs = [
-    appstream
-    glib # for glib-compile-schemas
-    gobject-introspection
-    meson
-    ninja
-    pkg-config
-    wrapGAppsHook3
-  ];
-
-  buildInputs = [
-    glib
-    glib-networking
-    gtk3
-    libhandy
-    webkitgtk
-  ];
-
-  propagatedBuildInputs = with python3.pkgs; [
-    beautifulsoup4
-    python-dateutil
-    feedparser
-    html5lib
-    listparser
-    lxml
-    pillow
-    pygments
-    pygobject3
-    readability-lxml
-    pytz
-    requests
-  ];
-
-  dontWrapGApps = true;
-
-  preFixup = ''
-    makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
-  '';
-
-  passthru = {
-    inherit listparser;
-  };
-
-  meta = with lib; {
-    description = "RSS/Atom feed reader for GNOME";
-    mainProgram = "gfeeds";
-    homepage = "https://gitlab.gnome.org/World/gfeeds";
-    license = licenses.gpl3Plus;
-    maintainers = [
-      maintainers.pbogdan
-    ];
-    platforms = platforms.linux;
-  };
-}
diff --git a/pkgs/applications/networking/feedreaders/gnome-feeds/listparser.nix b/pkgs/applications/networking/feedreaders/gnome-feeds/listparser.nix
deleted file mode 100644
index 7dd2f752598fa..0000000000000
--- a/pkgs/applications/networking/feedreaders/gnome-feeds/listparser.nix
+++ /dev/null
@@ -1,33 +0,0 @@
-{ lib
-, python3
-, fetchPypi
-}:
-
-python3.pkgs.buildPythonPackage rec {
-  pname = "listparser";
-  version = "0.18";
-
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "0hdqs1mmayw1r8yla43hgb4d9y3zqs5483vgf8j9ygczkd2wrq2b";
-  };
-
-  propagatedBuildInputs = with python3.pkgs; [
-    requests
-    six
-  ];
-
-  checkPhase = ''
-    ${python3.interpreter} lptest.py
-  '';
-
-  meta = with lib; {
-    description = "Parser for subscription lists";
-    homepage = "https://github.com/kurtmckee/listparser";
-    license = licenses.lgpl3Plus;
-    maintainers = [
-      maintainers.pbogdan
-    ];
-    platforms = platforms.linux;
-  };
-}
diff --git a/pkgs/by-name/gn/gnome-feeds/package.nix b/pkgs/by-name/gn/gnome-feeds/package.nix
new file mode 100644
index 0000000000000..e502a17bdbed1
--- /dev/null
+++ b/pkgs/by-name/gn/gnome-feeds/package.nix
@@ -0,0 +1,95 @@
+{
+  lib,
+  python3,
+
+  fetchFromGitLab,
+  fetchpatch,
+
+  appstream,
+  gobject-introspection,
+  meson,
+  ninja,
+  pkg-config,
+  blueprint-compiler,
+  wrapGAppsHook4,
+
+  glib-networking,
+  libadwaita,
+  webkitgtk_6_0,
+}:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "gnome-feeds";
+  version = "2.2.0";
+  pyproject = false;
+
+  src = fetchFromGitLab {
+    domain = "gitlab.gnome.org";
+    owner = "World";
+    repo = "gfeeds";
+    rev = version;
+    hash = "sha256-XKwRFjz4ocH01mj8KshLGmGxbm/uvDiyYRf65KL0UFw=";
+  };
+
+  patches = [
+    # both patches needed to built with newer blueprint-compiler
+    (fetchpatch {
+      name = "fix-for-blueprint-0.8.patch";
+      url = "https://gitlab.gnome.org/World/gfeeds/-/commit/cfe860f44f685be302e2ad9f30b55bab08e078ce.patch";
+      hash = "sha256-exkq9KykB60/X8u3+T1/sShrhGP8BvNkaBWPzm2mchc=";
+    })
+    (fetchpatch {
+      name = "upgrade-blueprint-0.8-syntax.patch";
+      url = "https://gitlab.gnome.org/World/gfeeds/-/commit/d099fda0c62e338080061683a154f711cc487b30.patch";
+      hash = "sha256-M6QLRTj+CItk3XPDeexf3/+B1YHJoHsTjwdE6iw1xjM=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    appstream
+    gobject-introspection
+    meson
+    ninja
+    pkg-config
+    blueprint-compiler
+    wrapGAppsHook4
+  ];
+
+  buildInputs = [
+    glib-networking
+    libadwaita
+    webkitgtk_6_0
+  ];
+
+  dependencies = with python3.pkgs; [
+    beautifulsoup4
+    humanize
+    python-dateutil
+    syndication-domination
+    python-magic
+    pillow
+    pygments
+    pygobject3
+    readability-lxml
+    pytz
+    requests
+  ];
+
+  dontWrapGApps = true;
+
+  preFixup = ''
+    makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
+  '';
+
+  meta = {
+    description = "RSS/Atom feed reader for GNOME";
+    mainProgram = "gfeeds";
+    homepage = "https://gitlab.gnome.org/World/gfeeds";
+    license = lib.licenses.gpl3Plus;
+    maintainers = with lib.maintainers; [
+      pbogdan
+      aleksana
+    ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/by-name/sy/syndication-domination/package.nix b/pkgs/by-name/sy/syndication-domination/package.nix
new file mode 100644
index 0000000000000..10e325d856425
--- /dev/null
+++ b/pkgs/by-name/sy/syndication-domination/package.nix
@@ -0,0 +1,55 @@
+{
+  lib,
+  stdenv,
+  fetchFromGitLab,
+  meson,
+  ninja,
+  pkg-config,
+  pugixml,
+  fmt,
+  html-tidy,
+  enablePython? false,
+  python3Packages,
+}:
+
+stdenv.mkDerivation {
+  pname = "syndication-domination";
+  # author extraction feature needed by gnome-feeds
+  version = "1.0-unstable-2023-03-25";
+
+  src = fetchFromGitLab {
+    owner = "gabmus";
+    repo = "syndication-domination";
+    rev = "75920321062d682437f3fb0319dad227d8b18f6c";
+    hash = "sha256-fOlE9CsNcmGkVBXaqYHxLDWB8voeRp46+dZYIJIwg7o=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+  ];
+
+  buildInputs = [
+    pugixml
+    fmt
+    html-tidy
+  ] ++ lib.optionals enablePython [
+    python3Packages.python
+    python3Packages.pybind11
+  ];
+
+  mesonFlags = [
+    (lib.mesonBool "TO_JSON_BINARY" true)
+    (lib.mesonBool "PYTHON_BINDINGS" enablePython)
+  ];
+
+  meta = {
+    description = "RSS/Atom parser written in C++ with Python binding";
+    homepage = "https://gitlab.com/gabmus/syndication-domination";
+    license = lib.licenses.agpl3Only;
+    mainProgram = "SyndicationDomination";
+    maintainers = with lib.maintainers; [ aleksana ];
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index fa7df046ea897..ab567c421e6c5 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -8331,8 +8331,6 @@ with pkgs;
 
   gnome-extension-manager = callPackage ../applications/misc/gnome-extension-manager { };
 
-  gnome-feeds = callPackage ../applications/networking/feedreaders/gnome-feeds { };
-
   gnome-frog = callPackage ../applications/misc/gnome-frog { };
 
   gnome-keysign = callPackage ../tools/security/gnome-keysign { };
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index f7dd618be0fcd..db697c89daf7e 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -14844,6 +14844,11 @@ self: super: with self; {
 
   syncer = callPackage ../development/python-modules/syncer { };
 
+  syndication-domination = toPythonModule (pkgs.syndication-domination.override {
+    enablePython = true;
+    python3Packages = self;
+  });
+
   synergy = callPackage ../development/python-modules/synergy { };
 
   synologydsm-api = callPackage ../development/python-modules/synologydsm-api { };