diff --git a/pkgs/development/python-modules/discogs-client/default.nix b/pkgs/development/python-modules/discogs-client/default.nix new file mode 100644 index 000000000000..e47922f9577a --- /dev/null +++ b/pkgs/development/python-modules/discogs-client/default.nix @@ -0,0 +1,40 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, requests +, oauthlib +, python-dateutil +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "discogs-client"; + version = "2.3.12"; + + + src = fetchFromGitHub { + owner = "joalla"; + repo = "discogs_client"; + rev = "v${version}"; + sha256 = "0y553x8rkgmqqg980n62pwdxbp75xalkhlb6k5g0cms42ggy5fsc"; + }; + + propagatedBuildInputs = [ + requests + oauthlib + python-dateutil + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "discogs_client" ]; + + meta = with lib; { + description = "Unofficial Python API client for Discogs"; + homepage = "https://github.com/joalla/discogs_client"; + license = licenses.bsd2; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/discogs_client/default.nix b/pkgs/development/python-modules/discogs_client/default.nix deleted file mode 100644 index e522ac4b6c9d..000000000000 --- a/pkgs/development/python-modules/discogs_client/default.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ lib, buildPythonPackage, fetchPypi, requests, oauthlib }: - -buildPythonPackage rec { - pname = "discogs-client"; - version = "2.3.0"; - - src = fetchPypi { - inherit pname version; - sha256 = "cc979fcbb5283f74d388c7111c8ed6bef920b01614a014d6b1c5d6fbb554bfc3"; - }; - - propagatedBuildInputs = [ requests oauthlib ]; - - meta = with lib; { - description = "Official Python API client for Discogs"; - license = licenses.bsd2; - homepage = "https://github.com/discogs/discogs_client"; - }; -} diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 22dd7abe2eb7..301dcafeb294 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -37,8 +37,9 @@ mapAliases ({ bugseverywhere = throw "bugseverywhere has been removed: Abandoned by upstream."; # Added 2019-11-27 dateutil = python-dateutil; # added 2021-07-03 detox = throw "detox is no longer maintained, and was broken since may 2019"; # added 2020-07-04 - diff_cover = diff-cover; # added 2021-07-02 dftfit = throw "it's dependency lammps-cython no longer builds"; + diff_cover = diff-cover; # added 2021-07-02 + discogs_client = discogs-client; # added 2021-07-02 dns = dnspython; # Alias for compatibility, 2017-12-10 faulthandler = throw "faulthandler is built into ${python.executable}"; gitdb2 = throw "gitdb2 has been deprecated, use gitdb instead."; # added 2020-03-14 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ed43c69c3736..a15a1450c78d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1937,7 +1937,7 @@ in { discid = callPackage ../development/python-modules/discid { }; - discogs_client = callPackage ../development/python-modules/discogs_client { }; + discogs-client = callPackage ../development/python-modules/discogs-client { }; discordpy = callPackage ../development/python-modules/discordpy { };