at master 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 installShellFiles, 7 setuptools, 8 gitpython, 9 typer, 10 pydantic-settings, 11}: 12 13buildPythonPackage rec { 14 pname = "git-dummy"; 15 version = "0.1.2"; 16 pyproject = true; 17 18 src = fetchFromGitHub { 19 owner = "initialcommit-com"; 20 repo = "git-dummy"; 21 rev = "v${version}"; 22 hash = "sha256-viybxn2J7SO7NgSvjwlP+tgtm+H6QrACafIy82d9XEk="; 23 }; 24 25 build-system = [ setuptools ]; 26 27 dependencies = [ 28 gitpython 29 typer 30 pydantic-settings 31 ]; 32 33 nativeBuildInputs = [ installShellFiles ]; 34 35 postInstall = 36 # https://github.com/NixOS/nixpkgs/issues/308283 37 lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' 38 installShellCompletion --cmd git-dummy \ 39 --bash <($out/bin/git-dummy --show-completion bash) \ 40 --fish <($out/bin/git-dummy --show-completion fish) \ 41 --zsh <($out/bin/git-dummy --show-completion zsh) 42 ''; 43 44 meta = { 45 homepage = "https://github.com/initialcommit-com/git-dummy"; 46 description = "Generate dummy Git repositories populated with the desired number of commits, branches, and structure"; 47 license = lib.licenses.gpl2Only; 48 maintainers = with lib.maintainers; [ mathiassven ]; 49 }; 50}