python3Packages.filecheck: Use buildPythonPackage

Build using poetry-core, enabled tests, expose as top-level attribute.
This commit is contained in:
Martin Weinelt 2022-10-02 14:58:23 +02:00
parent 17b976e99f
commit 1ec7b00db3
2 changed files with 22 additions and 5 deletions

View File

@ -1,10 +1,11 @@
{ lib
, buildPythonApplication
, buildPythonPackage
, fetchFromGitHub
, poetry
, poetry-core
, pytestCheckHook
}:
buildPythonApplication rec {
buildPythonPackage rec {
pname = "filecheck";
version = "0.0.22";
format = "pyproject";
@ -16,9 +17,23 @@ buildPythonApplication rec {
sha256 = "sha256-I2SypKkgcVuLyLiwNw5oWDb9qT56TbC6vbui8PEcziI=";
};
nativeBuildInputs = [ poetry ];
postPatch = ''
substituteInPlace pyproject.toml \
--replace "poetry>=0.12" "poetry-core" \
--replace "poetry.masonry.api" "poetry.core.masonry.api"
'';
pythonImportsCheck = [ "filecheck" ];
nativeBuildInputs = [
poetry-core
];
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"filecheck"
];
meta = with lib; {
homepage = "https://github.com/mull-project/FileCheck.py";

View File

@ -13398,6 +13398,8 @@ with pkgs;
fasmg = callPackage ../development/compilers/fasmg { };
filecheck = with python3Packages; toPythonApplication filecheck;
firrtl = callPackage ../development/compilers/firrtl { };
flasm = callPackage ../development/compilers/flasm { };