1{ lib, git, python3, fetchFromGitHub }:
2
3python3.pkgs.buildPythonApplication rec {
4 pname = "copier";
5 version = "9.1.0";
6 format = "pyproject";
7
8 src = fetchFromGitHub {
9 owner = "copier-org";
10 repo = "copier";
11 rev = "v${version}";
12 # Conflict on APFS on darwin
13 postFetch = ''
14 rm $out/tests/demo/doc/ma*ana.txt
15 '';
16 hash = "sha256-x5r7Xv4lAOMkR+UIEeSY7LvbYMLpTWYuICYe9ygz1tA=";
17 };
18
19 POETRY_DYNAMIC_VERSIONING_BYPASS = version;
20
21 nativeBuildInputs = [
22 python3.pkgs.poetry-core
23 python3.pkgs.poetry-dynamic-versioning
24 ];
25
26 propagatedBuildInputs = with python3.pkgs; [
27 colorama
28 decorator
29 dunamai
30 funcy
31 iteration-utilities
32 jinja2
33 jinja2-ansible-filters
34 mkdocs-material
35 mkdocs-mermaid2-plugin
36 mkdocstrings
37 packaging
38 pathspec
39 plumbum
40 pydantic
41 pygments
42 pyyaml
43 pyyaml-include
44 questionary
45 ];
46
47 makeWrapperArgs = [
48 "--suffix PATH : ${lib.makeBinPath [ git ] }"
49 ];
50
51 meta = with lib; {
52 description = "Library and command-line utility for rendering projects templates";
53 homepage = "https://copier.readthedocs.io";
54 license = licenses.mit;
55 maintainers = with maintainers; [ jonringer greg ];
56 mainProgram = "copier";
57 };
58}