1{ lib 2, buildPythonPackage 3, fetchFromGitLab 4, pythonOlder 5, git 6, flit-core 7, setuptools-scm 8, tomli 9}: 10 11buildPythonPackage rec { 12 pname = "flit-scm"; 13 version = "1.7.0"; 14 15 format = "pyproject"; 16 17 src = fetchFromGitLab { 18 owner = "WillDaSilva"; 19 repo = "flit_scm"; 20 rev = version; 21 sha256 = "sha256-K5sH+oHgX/ftvhkY+vIg6wUokAP96YxrTWds3tnEtyg="; 22 leaveDotGit = true; 23 }; 24 25 nativeBuildInputs = [ flit-core setuptools-scm tomli git ]; 26 propagatedBuildInputs = [ flit-core setuptools-scm ] ++ lib.optionals (pythonOlder "3.11") [ tomli ]; 27 28 meta = with lib; { 29 description = "A PEP 518 build backend that uses setuptools_scm to generate a version file from your version control system, then flit to build the package."; 30 homepage = "https://gitlab.com/WillDaSilva/flit_scm"; 31 license = licenses.mit; 32 maintainers = with maintainers; [ cpcloud ]; 33 }; 34}