From 5be300c116687fb79d37c0a7733b8e4b2bcdf1a1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Sun, 6 Jun 2021 02:17:53 +0200 Subject: [PATCH] Add woob --- environments/immae-eu.nix | 2 +- pkgs/default.nix | 1 + pkgs/woob/default.nix | 72 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 pkgs/woob/default.nix diff --git a/environments/immae-eu.nix b/environments/immae-eu.nix index f54e876..ca9e5b5 100644 --- a/environments/immae-eu.nix +++ b/environments/immae-eu.nix @@ -46,7 +46,7 @@ let feh imagemagick tiv graphicsmagick qrcode # internet browsing - w3m lynx links elinks browsh weboob urlview urlscan googler urlwatch + w3m lynx links elinks browsh woob urlview urlscan googler urlwatch # less python3Packages.pygments lesspipe highlight sourceHighlight diff --git a/pkgs/default.nix b/pkgs/default.nix index 7c120a8..f567104 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -75,5 +75,6 @@ rec { }; fiche = callPackage ./fiche { inherit mylibs; }; + woob = python3Packages.callPackage ./woob {}; zrepl = callPackage ./zrepl {}; } diff --git a/pkgs/woob/default.nix b/pkgs/woob/default.nix new file mode 100644 index 0000000..22928b9 --- /dev/null +++ b/pkgs/woob/default.nix @@ -0,0 +1,72 @@ +{ lib +, buildPythonPackage +, fetchPypi +, isPy27 +, Babel +, colorama +, cssselect +, dateutil +, feedparser +, gdata +, gnupg +, html2text +, libyaml +, lxml +, mechanize +, nose +, pdfminer +, pillow +, prettytable +, pyqt5 +, pyyaml +, requests +, simplejson +, termcolor +, unidecode +}: + +buildPythonPackage rec { + pname = "woob"; + version = "3.0"; + disabled = isPy27; + + src = fetchPypi { + inherit pname version; + sha256 = "09hpxy5zhn2b8li0xjf3zd7s46lawb0315p5mdcsci3bj3s4v1j7"; + }; + + nativeBuildInputs = [ pyqt5 ]; + + propagatedBuildInputs = [ + Babel + colorama + cssselect + dateutil + feedparser + gdata + gnupg + html2text + libyaml + lxml + mechanize + pdfminer + pillow + prettytable + pyqt5 + pyyaml + requests + simplejson + termcolor + unidecode + ]; + + doCheck = false; + + meta = with lib; { + homepage = "https://woob.tech"; + description = "Collection of applications and APIs to interact with websites without requiring the user to open a browser"; + license = licenses.lgpl3Plus; + maintainers = [ maintainers.DamienCassou ]; + }; +} + -- 2.41.0