at 24.05-pre 1.1 kB view raw
1{ lib 2, buildPythonPackage 3, cargo 4, fetchFromGitHub 5, poetry-core 6, pytestCheckHook 7, pythonOlder 8, rustc 9, rustPlatform 10}: 11 12buildPythonPackage rec { 13 pname = "pyheck"; 14 version = "0.1.5"; 15 format = "pyproject"; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "kevinheavey"; 21 repo = "pyheck"; 22 rev = "refs/tags/${version}"; 23 hash = "sha256-mfXkrCbBaJ0da+taKJvfyU5NS43tYJWqtTUXiCLVoGQ="; 24 }; 25 26 cargoDeps = rustPlatform.importCargoLock { 27 lockFile = ./Cargo.lock; 28 }; 29 30 postPatch = '' 31 ln -s ${./Cargo.lock} Cargo.lock 32 ''; 33 34 nativeBuildInputs = [ 35 cargo 36 poetry-core 37 rustc 38 rustPlatform.cargoSetupHook 39 rustPlatform.maturinBuildHook 40 ]; 41 42 nativeCheckInputs = [ 43 pytestCheckHook 44 ]; 45 46 pythonImportsCheck = [ 47 "pyheck" 48 ]; 49 50 meta = with lib; { 51 description = "Python bindings for heck, the Rust case conversion library"; 52 homepage = "https://github.com/kevinheavey/pyheck"; 53 changelog = "https://github.com/kevinheavey/pyheck/blob/${version}/CHANGELOG.md"; 54 license = licenses.mit; 55 maintainers = with maintainers; [ fab ]; 56 }; 57}