mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-11-27 00:10:12 +00:00
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
37 lines
915 B
Nix
37 lines
915 B
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pytestCheckHook,
|
|
pythonOlder,
|
|
stdenv,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "aspy-refactor-imports";
|
|
version = "3.0.1";
|
|
format = "setuptools";
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "asottile";
|
|
repo = "aspy.refactor_imports";
|
|
rev = "v${version}";
|
|
sha256 = "MlCM3zNTQZJ1RWrTQG0AN28RUepWINKCeLENykbu2nw=";
|
|
};
|
|
|
|
pythonImportsCheck = [ "aspy.refactor_imports" ];
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
# fails on darwin due to case-insensitive file system
|
|
disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ "test_application_directory_case" ];
|
|
|
|
meta = {
|
|
description = "Utilities for refactoring imports in python-like syntax";
|
|
homepage = "https://github.com/asottile/aspy.refactor_imports";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ gador ];
|
|
};
|
|
}
|