From 0952faad43b0d56ab40039d6f21a04e49b8dac97 Mon Sep 17 00:00:00 2001 From: Ilan Joselevich Date: Fri, 7 Apr 2023 19:46:13 +0300 Subject: [PATCH] python3Packages.yasi: init at 2.1.2 --- .../python-modules/yasi/default.nix | 36 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/development/python-modules/yasi/default.nix diff --git a/pkgs/development/python-modules/yasi/default.nix b/pkgs/development/python-modules/yasi/default.nix new file mode 100644 index 00000000000..00eb1937fe8 --- /dev/null +++ b/pkgs/development/python-modules/yasi/default.nix @@ -0,0 +1,36 @@ +{ lib +, python3 +, fetchFromGitHub +}: + +python3.pkgs.buildPythonApplication rec { + pname = "yasi"; + version = "2.1.2"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "nkmathew"; + repo = "yasi-sexp-indenter"; + rev = "v${version}"; + hash = "sha256-xKhVTmh/vrtBkatxtk8R4yqbGroH0I+xTKNYUpuikt4="; + }; + + propagatedBuildInputs = with python3.pkgs; [ + colorama + ]; + + postPatch = '' + substituteInPlace setup.py \ + --replace "test.test_yasi" "tests.test_yasi" + ''; + + pythonImportsCheck = [ "yasi" ]; + + meta = with lib; { + description = "A dialect-aware s-expression indenter written in Python and newLISP"; + homepage = "https://github.com/nkmathew/yasi-sexp-indenter"; + changelog = "https://github.com/nkmathew/yasi-sexp-indenter/blob/${src.rev}/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ kranzes ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 627b11b5ad9..c0f777499fb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12842,6 +12842,8 @@ self: super: with self; { yarl = callPackage ../development/python-modules/yarl { }; + yasi = toPythonModule (callPackage ../development/python-modules/yasi { }); + yaspin = callPackage ../development/python-modules/yaspin { }; yaswfp = callPackage ../development/python-modules/yaswfp { };