From 82470c2e3b84f50f51dd14bf9fb020ce84947497 Mon Sep 17 00:00:00 2001 From: Ivan Kozik Date: Mon, 24 Dec 2018 10:42:06 +0000 Subject: [PATCH] snscrape: init at 0.1.3 (#52758) --- .../python-modules/snscrape/default.nix | 35 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ pkgs/top-level/python-packages.nix | 2 ++ 3 files changed, 39 insertions(+) create mode 100644 pkgs/development/python-modules/snscrape/default.nix diff --git a/pkgs/development/python-modules/snscrape/default.nix b/pkgs/development/python-modules/snscrape/default.nix new file mode 100644 index 000000000000..972ea3149f94 --- /dev/null +++ b/pkgs/development/python-modules/snscrape/default.nix @@ -0,0 +1,35 @@ +{ lib +, buildPythonPackage +, isPy3k +, fetchPypi +, requests +, lxml +, beautifulsoup4 +}: + +buildPythonPackage rec { + pname = "snscrape"; + version = "0.1.3"; + + disabled = !isPy3k; + + src = fetchPypi { + inherit pname version; + sha256 = "1mnhqqc7xfwg2wrzpj1pjbcisjjwxrgmy21f53p80xbx2iz8b9n1"; + }; + + # There are no tests; make sure the executable works. + checkPhase = '' + export PATH=$PATH:$out/bin + snscrape --help + ''; + + propagatedBuildInputs = [ requests lxml beautifulsoup4 ]; + + meta = with lib; { + homepage = https://github.com/JustAnotherArchivist/snscrape; + description = "A social networking service scraper in Python"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ ivan ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4c495072cde0..007673eeddb4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22818,6 +22818,8 @@ in snapraid = callPackage ../tools/filesystems/snapraid { }; + snscrape = with python3Packages; toPythonApplication snscrape; + soundOfSorting = callPackage ../misc/sound-of-sorting { }; sourceAndTags = callPackage ../misc/source-and-tags { diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 398cd92a52ed..67cd6cf19483 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3938,6 +3938,8 @@ in { snowballstemmer = callPackage ../development/python-modules/snowballstemmer { }; + snscrape = callPackage ../development/python-modules/snscrape { }; + snug = callPackage ../development/python-modules/snug { }; snuggs = callPackage ../development/python-modules/snuggs { };