From e9223f4a21c95b7d6719ef1b30b70fe0f7f90dc5 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 14 Sep 2022 10:08:21 +0200 Subject: [PATCH] beautysh: init at 6.2.1 --- pkgs/development/tools/beautysh/default.nix | 49 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 51 insertions(+) create mode 100644 pkgs/development/tools/beautysh/default.nix diff --git a/pkgs/development/tools/beautysh/default.nix b/pkgs/development/tools/beautysh/default.nix new file mode 100644 index 00000000000..f01857fc608 --- /dev/null +++ b/pkgs/development/tools/beautysh/default.nix @@ -0,0 +1,49 @@ +{ lib +, fetchFromGitHub +, python3 +}: + +python3.pkgs.buildPythonApplication rec { + pname = "beautysh"; + version = "6.2.1"; + format = "pyproject"; + + + src = fetchFromGitHub { + owner = "lovesegfault"; + repo = pname; + rev = "v${version}"; + hash = "sha256-rPeGRcyNK45Y7OvtzaIH93IIzexBf/jM1SzYP0phQ1o="; + }; + + nativeBuildInputs = with python3.pkgs; [ + poetry-core + ]; + + propagatedBuildInputs = with python3.pkgs; [ + colorama + setuptools + types-colorama + types-setuptools + ]; + + checkInputs = with python3.pkgs; [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace 'types-setuptools = "^57.4.0"' 'types-setuptools = "*"' + ''; + + pythonImportsCheck = [ + "beautysh" + ]; + + meta = with lib; { + description = "Tool for beautifying Bash scripts"; + homepage = "https://github.com/lovesegfault/beautysh"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 57899333238..31a67d0348f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2953,6 +2953,8 @@ with pkgs; inherit (plasma5Packages) breeze-icons; }; + beautysh = callPackage ../development/tools/beautysh { }; + bc = callPackage ../tools/misc/bc { }; bdf2psf = callPackage ../tools/misc/bdf2psf { };