diff options
author | Eduardo Sánchez Muñoz <esm@eduardosm.net> | 2021-04-27 19:52:23 +0200 |
---|---|---|
committer | Eduardo Sánchez Muñoz <esm@eduardosm.net> | 2021-05-07 20:12:58 +0200 |
commit | afdf5089e71d08d3669cf012a9cd81201df1c3ed (patch) | |
tree | 7687fb67b00c60f96f1034e9fbb7bfec049d1e14 /pkgs/development/python-modules/cwcwidth | |
parent | e50164a7ce00019cba2b07b5ec0fc85f22ec72c0 (diff) |
pythonPackages.cwcwidth: init at 0.1.4
Diffstat (limited to 'pkgs/development/python-modules/cwcwidth')
-rw-r--r-- | pkgs/development/python-modules/cwcwidth/default.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/cwcwidth/default.nix b/pkgs/development/python-modules/cwcwidth/default.nix new file mode 100644 index 0000000000000..a17a8a936aa06 --- /dev/null +++ b/pkgs/development/python-modules/cwcwidth/default.nix @@ -0,0 +1,34 @@ +{ lib, buildPythonPackage, fetchPypi, cython, pytestCheckHook }: + +buildPythonPackage rec { + pname = "cwcwidth"; + version = "0.1.4"; + format = "pyproject"; + + src = fetchPypi { + inherit pname version; + sha256 = "1azrphpkcyggg38xvkfb9dpc4xmmm90p02kf8dkqd4d6j5w96aj8"; + }; + + nativeBuildInputs = [ cython ]; + + checkInputs = [ pytestCheckHook ]; + # Hack needed to make pytest + cython work + # https://github.com/NixOS/nixpkgs/pull/82410#issuecomment-827186298 + preCheck = '' + export HOME=$(mktemp -d) + cp -r $TMP/$sourceRoot/tests $HOME + pushd $HOME + ''; + postCheck = "popd"; + + pythonImportsCheck = [ "cwcwidth" ]; + + meta = with lib; { + description = "Python bindings for wc(s)width"; + homepage = "https://github.com/sebastinas/cwcwidth"; + changelog = "https://github.com/sebastinas/cwcwidth/blob/main/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ eduardosm ]; + }; +} |