From a91ecb2e254cab9600babc79848b216f46c72119 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Oct 2022 15:05:25 +0200 Subject: [PATCH] rfc-bibtex: Migrate out of python3Packages This is a commandline tool, that does not advertise itself as as consumable library, so it does not belong into the python package set. Also fetch from git, so we can enable the tests. --- .../python-modules/rfc-bibtex/default.nix | 20 ----------- pkgs/tools/typesetting/rfc-bibtex/default.nix | 33 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 34 insertions(+), 21 deletions(-) delete mode 100644 pkgs/development/python-modules/rfc-bibtex/default.nix create mode 100644 pkgs/tools/typesetting/rfc-bibtex/default.nix diff --git a/pkgs/development/python-modules/rfc-bibtex/default.nix b/pkgs/development/python-modules/rfc-bibtex/default.nix deleted file mode 100644 index b9b7cdb76c4f..000000000000 --- a/pkgs/development/python-modules/rfc-bibtex/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ lib, buildPythonApplication, fetchPypi, isPy3k }: - -buildPythonApplication rec { - pname = "rfc-bibtex"; - version = "0.3.2"; - - src = fetchPypi { - inherit pname version; - sha256 = "60419a2043ef37ac2438f3eae7a3207d0a4cb2dd56ab21697f874a35ee52927f"; - }; - - disabled = !isPy3k; - - meta = with lib; { - homepage = "https://github.com/iluxonchik/rfc-bibtex/"; - description = "Generate Bibtex entries for IETF RFCs and Internet-Drafts"; - license = licenses.mit; - maintainers = with maintainers; [ teto ]; - }; -} diff --git a/pkgs/tools/typesetting/rfc-bibtex/default.nix b/pkgs/tools/typesetting/rfc-bibtex/default.nix new file mode 100644 index 000000000000..de38b4cd29c2 --- /dev/null +++ b/pkgs/tools/typesetting/rfc-bibtex/default.nix @@ -0,0 +1,33 @@ +{ lib +, fetchFromGitHub +, python3 +}: + +with python3.pkgs; buildPythonApplication rec { + pname = "rfc-bibtex"; + version = "0.3.2"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "iluxonchik"; + repo = pname; + rev = "refs/tags/${version}"; + hash = "sha256-bPCNQqiG50vWVFA6J2kyxftwsXunHTNBdSkoIRYkb0s="; + }; + + checkInputs = [ + pytestCheckHook + vcrpy + ]; + + pythonImportsCheck = [ + "rfc_bibtex" + ]; + + meta = with lib; { + homepage = "https://github.com/iluxonchik/rfc-bibtex/"; + description = "Generate Bibtex entries for IETF RFCs and Internet-Drafts"; + license = licenses.mit; + maintainers = with maintainers; [ teto ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b88d696138f6..b7aae58d7333 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -36416,7 +36416,7 @@ with pkgs; renderizer = callPackage ../development/tools/renderizer {}; - rfc-bibtex = python3Packages.callPackage ../development/python-modules/rfc-bibtex { }; + rfc-bibtex = callPackage ../tools/typesetting/rfc-bibtex { }; pick-colour-picker = python3Packages.callPackage ../applications/graphics/pick-colour-picker { inherit glib gtk3 gobject-introspection wrapGAppsHook;