biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / pyheck / default.nix
blobfca55ff984b5c125cf589e18b7ed9ef5c978fde0
2   lib,
3   buildPythonPackage,
4   cargo,
5   fetchFromGitHub,
6   libiconv,
7   poetry-core,
8   pytestCheckHook,
9   pythonOlder,
10   rustc,
11   rustPlatform,
12   stdenv,
15 buildPythonPackage rec {
16   pname = "pyheck";
17   version = "0.1.5";
18   format = "pyproject";
20   disabled = pythonOlder "3.7";
22   src = fetchFromGitHub {
23     owner = "kevinheavey";
24     repo = "pyheck";
25     rev = "refs/tags/${version}";
26     hash = "sha256-mfXkrCbBaJ0da+taKJvfyU5NS43tYJWqtTUXiCLVoGQ=";
27   };
29   cargoDeps = rustPlatform.importCargoLock { lockFile = ./Cargo.lock; };
31   postPatch = ''
32     ln -s ${./Cargo.lock} Cargo.lock
33   '';
35   nativeBuildInputs = [
36     cargo
37     poetry-core
38     rustc
39     rustPlatform.cargoSetupHook
40     rustPlatform.maturinBuildHook
41   ];
43   buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
45   nativeCheckInputs = [ pytestCheckHook ];
47   pythonImportsCheck = [ "pyheck" ];
49   meta = with lib; {
50     description = "Python bindings for heck, the Rust case conversion library";
51     homepage = "https://github.com/kevinheavey/pyheck";
52     changelog = "https://github.com/kevinheavey/pyheck/blob/${version}/CHANGELOG.md";
53     license = licenses.mit;
54     maintainers = with maintainers; [ fab ];
55   };