From 38ea3741bc5f5654878f5e9b1d51f2dfa5c2e27c Mon Sep 17 00:00:00 2001 From: fortuneteller2k Date: Sun, 28 Feb 2021 15:33:50 +0800 Subject: [PATCH] sacad: init at 2.3.4 --- .../{web_cache => web-cache}/default.nix | 14 ++++--- pkgs/tools/misc/sacad/default.nix | 39 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + pkgs/top-level/python-packages.nix | 2 +- 4 files changed, 50 insertions(+), 7 deletions(-) rename pkgs/development/python-modules/{web_cache => web-cache}/default.nix (71%) create mode 100644 pkgs/tools/misc/sacad/default.nix diff --git a/pkgs/development/python-modules/web_cache/default.nix b/pkgs/development/python-modules/web-cache/default.nix similarity index 71% rename from pkgs/development/python-modules/web_cache/default.nix rename to pkgs/development/python-modules/web-cache/default.nix index ca1fb11460a8..9246b2b571e7 100644 --- a/pkgs/development/python-modules/web_cache/default.nix +++ b/pkgs/development/python-modules/web-cache/default.nix @@ -1,23 +1,25 @@ { lib, buildPythonPackage, fetchPypi, isPy3k }: buildPythonPackage rec { - pname = "web_cache"; + pname = "web-cache"; version = "1.1.0"; + disabled = !isPy3k; src = fetchPypi { - inherit pname version; + inherit version; + pname = "web_cache"; sha256 = "1d8f1s3i0s3h1jqvjq6cp639hhbbpxvyq7cf9dwzrvvvr0s0m8fm"; }; - disabled = !isPy3k; - - # web_cache doesn't have tests + # No tests in downloaded archive doCheck = false; + pythonImportsCheck = [ "web_cache" ]; + meta = with lib; { description = "Simple Python key-value storage backed up by sqlite3 database"; homepage = "https://github.com/desbma/web_cache"; - license = licenses.lgpl21Only; + license = licenses.lgpl2Plus; maintainers = with maintainers; [ fortuneteller2k ]; }; } diff --git a/pkgs/tools/misc/sacad/default.nix b/pkgs/tools/misc/sacad/default.nix new file mode 100644 index 000000000000..c5c48c271db7 --- /dev/null +++ b/pkgs/tools/misc/sacad/default.nix @@ -0,0 +1,39 @@ +{ lib, python3Packages, jpegoptim, optipng }: + +python3Packages.buildPythonApplication rec { + pname = "sacad"; + version = "2.3.4"; + + src = python3Packages.fetchPypi { + inherit pname version; + sha256 = "1qv2mrz6vy2sl7zhrj9vw016pjd7hmjr2ls0w8bbv1hgrddicn9r"; + }; + + propagatedBuildInputs = with python3Packages; [ + aiohttp + appdirs + bitarray + cssselect + fake-useragent + lxml + mutagen + pillow + tqdm + unidecode + web-cache + jpegoptim + optipng + ]; + + # tests require internet connection + doCheck = false; + + pythonImportsCheck = [ "sacad" ]; + + meta = with lib; { + description = "Smart Automatic Cover Art Downloader"; + homepage = "https://github.com/desbma/sacad"; + license = licenses.mpl20; + maintainers = with maintainers; [ fortuneteller2k ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 78aa21f044fd..981177c35467 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7732,6 +7732,8 @@ in s6-portable-utils = skawarePackages.s6-portable-utils; + sacad = callPackage ../tools/misc/sacad { }; + safecopy = callPackage ../tools/system/safecopy { }; sacd = callPackage ../tools/cd-dvd/sacd { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ee637944d698..4b4cf1ad01b9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8372,7 +8372,7 @@ in { web = callPackage ../development/python-modules/web { }; - web_cache = callPackage ../development/python-modules/web_cache { }; + web-cache = callPackage ../development/python-modules/web-cache { }; webcolors = callPackage ../development/python-modules/webcolors { };