a19cd4ffb1
This reverts commit65a333600d. This wasn't tested for correctness with something like fodwatch [0], and should not have been (self-)merged so quickly, especially without further review. It also resulted in the breakage of at least one package [1] (and that's the one we know of and was caught). A few packages that were updated in between this commit and this revert were not reverted back to using `rev`, but other than that, this is a 1:1 revert. [0]: https://codeberg.org/raphaelr/fodwatch [1]: https://github.com/NixOS/nixpkgs/pull/396904 /758551e458
61 lines
1.3 KiB
Nix
61 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
colorama,
|
|
fetchFromGitHub,
|
|
fetchpatch,
|
|
poetry-core,
|
|
pytest7CheckHook,
|
|
setuptools,
|
|
types-colorama,
|
|
types-setuptools,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "beautysh";
|
|
version = "6.2.1";
|
|
format = "pyproject";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "lovesegfault";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-rPeGRcyNK45Y7OvtzaIH93IIzexBf/jM1SzYP0phQ1o=";
|
|
};
|
|
|
|
patches = [
|
|
# https://github.com/lovesegfault/beautysh/pull/247
|
|
(fetchpatch {
|
|
name = "poetry-to-poetry-core.patch";
|
|
url = "https://github.com/lovesegfault/beautysh/commit/5f4fcac083fa68568a50f3c2bcee3ead0f3ca7c5.patch";
|
|
hash = "sha256-H/kIJKww5ouWu8rmRkaMOXcsq2daZWDdwxBqbc99x0s=";
|
|
})
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace 'types-setuptools = "^57.4.0"' 'types-setuptools = "*"'
|
|
'';
|
|
|
|
nativeBuildInputs = [ poetry-core ];
|
|
|
|
propagatedBuildInputs = [
|
|
colorama
|
|
setuptools
|
|
types-colorama
|
|
types-setuptools
|
|
];
|
|
|
|
nativeCheckInputs = [ pytest7CheckHook ];
|
|
|
|
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 ];
|
|
mainProgram = "beautysh";
|
|
};
|
|
}
|