about summary refs log tree commit diff
path: root/pkgs/development/python-modules/snscrape/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/snscrape/default.nix')
-rw-r--r--pkgs/development/python-modules/snscrape/default.nix19
1 files changed, 13 insertions, 6 deletions
diff --git a/pkgs/development/python-modules/snscrape/default.nix b/pkgs/development/python-modules/snscrape/default.nix
index 98933759f0bbe..379159180a060 100644
--- a/pkgs/development/python-modules/snscrape/default.nix
+++ b/pkgs/development/python-modules/snscrape/default.nix
@@ -2,6 +2,7 @@
 , beautifulsoup4
 , buildPythonPackage
 , fetchFromGitHub
+, filelock
 , lxml
 , pythonOlder
 , pytz
@@ -11,15 +12,16 @@
 
 buildPythonPackage rec {
   pname = "snscrape";
-  version = "unstable-2021-08-30";
+  version = "0.4.3.20220106";
+  format = "setuptools";
 
   disabled = pythonOlder "3.8";
 
   src = fetchFromGitHub {
     owner = "JustAnotherArchivist";
     repo = pname;
-    rev = "c76f1637ce1d7a154af83495b67ead2559cd5715";
-    sha256 = "01x4961fxj1p98y6fcyxw5sv8fa87x41fdx9p31is12bdkmqxi6v";
+    rev = "v${version}";
+    hash = "sha256-gphNT1IYSiAw22sqHlV8Rm4WRP4EWUvP0UkITuepmMc=";
   };
 
   SETUPTOOLS_SCM_PRETEND_VERSION = version;
@@ -30,9 +32,12 @@ buildPythonPackage rec {
 
   propagatedBuildInputs = [
     beautifulsoup4
+    filelock
     lxml
     requests
-  ] ++ lib.optionals (pythonOlder "3.9") [
+  ]
+  ++ requests.optional-dependencies.socks
+  ++ lib.optionals (pythonOlder "3.9") [
     pytz
   ];
 
@@ -42,11 +47,13 @@ buildPythonPackage rec {
     snscrape --help
   '';
 
-  pythonImportsCheck = [ "snscrape" ];
+  pythonImportsCheck = [
+    "snscrape"
+  ];
 
   meta = with lib; {
+    description = "A social networking service scraper";
     homepage = "https://github.com/JustAnotherArchivist/snscrape";
-    description = "A social networking service scraper in Python";
     license = licenses.gpl3Plus;
     maintainers = with maintainers; [ ivan ];
   };