1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 setuptools,
6 pathspec,
7 pytestCheckHook,
8 pyyaml,
9}:
10
11buildPythonPackage rec {
12 pname = "ssort";
13 version = "0.15.0";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "bwhmather";
18 repo = "ssort";
19 tag = version;
20 hash = "sha256-7WeLhetqbqiQQlDmoWSMzydhiKcdI2CbemKjWJd5Uoc=";
21 };
22
23 build-system = [ setuptools ];
24
25 dependencies = [ pathspec ];
26
27 pythonImportsCheck = [ "ssort" ];
28
29 nativeCheckInputs = [
30 pytestCheckHook
31 pyyaml
32 ];
33
34 preCheck = ''
35 export PATH=$out/bin:$PATH
36 '';
37
38 meta = {
39 description = "Automatically sorting python statements within a module";
40 homepage = "https://github.com/bwhmather/ssort";
41 license = lib.licenses.mit;
42 maintainers = with lib.maintainers; [ tochiaha ];
43 mainProgram = "ssort";
44 };
45}