|
1 | | -# gitv |
| 1 | +<div align="center"> |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | +</div> |
2 | 6 |
|
3 | 7 | [](https://ratatui.rs/) |
4 | 8 |  |
5 | 9 |
|
| 10 | +--- |
| 11 | + |
| 12 | +# gitv |
| 13 | + |
6 | 14 | > [!NOTE] |
7 | 15 | > |
8 | 16 | > Following in the footsteps of the `g`lobal `r`egex `e`xpression `p`rint `grep`, I introduce to you `g`ithub `i`ssues `t`ui `v`iewer `gitv`. |
@@ -63,124 +71,126 @@ cargo install --path . |
63 | 71 | <details> |
64 | 72 | <summary>Flake</summary> |
65 | 73 |
|
66 | | - First add the repository to your inputs. |
| 74 | +First add the repository to your inputs. |
67 | 75 |
|
68 | | - Point to main branch: |
69 | | - |
70 | | - ```nix |
71 | | - inputs = { |
72 | | - ... |
73 | | - gitv.url = "github:JayanAXHF/gitv"; |
74 | | - ... |
75 | | - }; |
76 | | - ``` |
| 76 | +Point to main branch: |
77 | 77 |
|
78 | | - Point to a rev in main branch: |
| 78 | +```nix |
| 79 | +inputs = { |
| 80 | + ... |
| 81 | + gitv.url = "github:JayanAXHF/gitv"; |
| 82 | + ... |
| 83 | +}; |
| 84 | +``` |
79 | 85 |
|
80 | | - ```nix |
81 | | - inputs = { |
82 | | - ... |
83 | | - gitv.url = "github:JayanAXHF/gitv/d70273b05c5e80b05446e4aa0847758e54435d62"; |
84 | | - ... |
85 | | - }; |
86 | | - ``` |
| 86 | +Point to a rev in main branch: |
87 | 87 |
|
88 | | - Point to a tag: |
| 88 | +```nix |
| 89 | +inputs = { |
| 90 | + ... |
| 91 | + gitv.url = "github:JayanAXHF/gitv/d70273b05c5e80b05446e4aa0847758e54435d62"; |
| 92 | + ... |
| 93 | +}; |
| 94 | +``` |
89 | 95 |
|
90 | | - ```nix |
91 | | - inputs = { |
92 | | - ... |
93 | | - gitv.url = "github:JayanAXHF/gitv/refs/tags/gitv-tui-v0.3.2"; |
94 | | - ... |
95 | | - }; |
96 | | - ``` |
97 | | - |
98 | | - Then your outputs should look something like this: |
99 | | - |
100 | | - ```nix |
101 | | - outputs = {...} @ inputs: { |
102 | | - # Don't forget to add nixpkgs to your inputs |
103 | | - nixosConfigurations."nixos" = inputs.nixpkgs.lib.nixosSystem { |
104 | | - ... |
105 | | - specialArgs = {inherit inputs;}; |
106 | | - modules = [ |
107 | | - ./configuration.nix |
108 | | - ... |
109 | | - ]; |
110 | | - }; |
111 | | - }; |
112 | | - ``` |
113 | | - |
114 | | - And finally, somewhere in your `configuration.nix`: |
115 | | - |
116 | | - ```nix |
117 | | - {inputs, pkgs, ...}: { |
| 96 | +Point to a tag: |
| 97 | + |
| 98 | +```nix |
| 99 | +inputs = { |
118 | 100 | ... |
119 | | - environment.systemPackages = [ |
120 | | - inputs.gitv.packages.${pkgs.stdenv.hostPlatform.system}.default |
121 | | - ]; |
| 101 | + gitv.url = "github:JayanAXHF/gitv/refs/tags/gitv-tui-v0.3.2"; |
122 | 102 | ... |
123 | | - } |
124 | | - ``` |
| 103 | +}; |
| 104 | +``` |
| 105 | + |
| 106 | +Then your outputs should look something like this: |
| 107 | + |
| 108 | +```nix |
| 109 | +outputs = {...} @ inputs: { |
| 110 | + # Don't forget to add nixpkgs to your inputs |
| 111 | + nixosConfigurations."nixos" = inputs.nixpkgs.lib.nixosSystem { |
| 112 | + ... |
| 113 | + specialArgs = {inherit inputs;}; |
| 114 | + modules = [ |
| 115 | + ./configuration.nix |
| 116 | + ... |
| 117 | + ]; |
| 118 | + }; |
| 119 | +}; |
| 120 | +``` |
| 121 | + |
| 122 | +And finally, somewhere in your `configuration.nix`: |
| 123 | + |
| 124 | +```nix |
| 125 | +{inputs, pkgs, ...}: { |
| 126 | + ... |
| 127 | + environment.systemPackages = [ |
| 128 | + inputs.gitv.packages.${pkgs.stdenv.hostPlatform.system}.default |
| 129 | + ]; |
| 130 | + ... |
| 131 | +} |
| 132 | +``` |
| 133 | + |
125 | 134 | </details> |
126 | 135 |
|
127 | 136 | <details> |
128 | 137 | <summary>Non-Flake</summary> |
129 | | - |
130 | | - ##### Pinning Tool |
131 | | - |
132 | | - First add the pin using your pinning tool. |
133 | | - |
134 | | - We are going to show examples using npins. |
135 | | - |
136 | | - Point to a branch: |
137 | | - |
138 | | - ```bash |
139 | | - npins add github JayanAXHF gitv -b main |
140 | | - ``` |
141 | | - |
142 | | - Point to a rev in main branch: |
143 | | - |
144 | | - ```bash |
145 | | - npins add github JayanAXHF gitv -b main --at d70273b05c5e80b05446e4aa0847758e54435d62 |
146 | | - ``` |
147 | | - |
148 | | - Point to a tag: |
149 | | - |
150 | | - ```bash |
151 | | - npins add github JayanAXHF gitv --at gitv-tui-v0.3.2 |
152 | | - ``` |
153 | | - |
154 | | - Or point to latest release: |
155 | | - |
156 | | - ```bash |
157 | | - npins add github JayanAXHF gitv |
158 | | - ``` |
159 | | - |
160 | | - Then add the package to your `systemPackages`: |
161 | | - |
162 | | - ```nix |
163 | | - let |
164 | | - sources = import ./npins; |
165 | | - in { |
166 | | - environment.systemPackages = [ |
167 | | - (import sources.gitv {}) |
168 | | - ]; |
169 | | - } |
170 | | - ``` |
171 | | - |
172 | | - ##### No Pinning Tool |
173 | | - |
174 | | - ```nix |
175 | | - let |
176 | | - rev = "d70273b05c5e80b05446e4aa0847758e54435d62"; |
177 | | - gitv = import (fetchTarball "https://github.com/JayanAXHF/gitv/archive/${rev}.tar.gz") {}; |
178 | | - in { |
179 | | - environment.systemPackages = [ |
180 | | - gitv |
181 | | - ]; |
182 | | - } |
183 | | - ``` |
| 138 | + |
| 139 | +##### Pinning Tool |
| 140 | + |
| 141 | +First add the pin using your pinning tool. |
| 142 | + |
| 143 | +We are going to show examples using npins. |
| 144 | + |
| 145 | +Point to a branch: |
| 146 | + |
| 147 | +```bash |
| 148 | +npins add github JayanAXHF gitv -b main |
| 149 | +``` |
| 150 | + |
| 151 | +Point to a rev in main branch: |
| 152 | + |
| 153 | +```bash |
| 154 | +npins add github JayanAXHF gitv -b main --at d70273b05c5e80b05446e4aa0847758e54435d62 |
| 155 | +``` |
| 156 | + |
| 157 | +Point to a tag: |
| 158 | + |
| 159 | +```bash |
| 160 | +npins add github JayanAXHF gitv --at gitv-tui-v0.3.2 |
| 161 | +``` |
| 162 | + |
| 163 | +Or point to latest release: |
| 164 | + |
| 165 | +```bash |
| 166 | +npins add github JayanAXHF gitv |
| 167 | +``` |
| 168 | + |
| 169 | +Then add the package to your `systemPackages`: |
| 170 | + |
| 171 | +```nix |
| 172 | +let |
| 173 | + sources = import ./npins; |
| 174 | +in { |
| 175 | + environment.systemPackages = [ |
| 176 | + (import sources.gitv {}) |
| 177 | + ]; |
| 178 | +} |
| 179 | +``` |
| 180 | + |
| 181 | +##### No Pinning Tool |
| 182 | + |
| 183 | +```nix |
| 184 | +let |
| 185 | + rev = "d70273b05c5e80b05446e4aa0847758e54435d62"; |
| 186 | + gitv = import (fetchTarball "https://github.com/JayanAXHF/gitv/archive/${rev}.tar.gz") {}; |
| 187 | +in { |
| 188 | + environment.systemPackages = [ |
| 189 | + gitv |
| 190 | + ]; |
| 191 | +} |
| 192 | +``` |
| 193 | + |
184 | 194 | </details> |
185 | 195 |
|
186 | 196 | ### Usage |
@@ -245,7 +255,7 @@ Contributions to `gitv` are welcome! If you have an idea for a new feature or ha |
245 | 255 | > [!TIP] |
246 | 256 | > Run the `init.py` initialization script to set up your development environment. It installs a pre-push hook that runs `typos` and `clippy` to help maintain code quality and consistency. Ensure that you have the `typos-cli` installed and available in your PATH for the pre-push hook to work correctly. You can install it using `cargo install typos-cli`. |
247 | 257 |
|
248 | | - [!TIP] |
| 258 | +> [!TIP] |
249 | 259 | > If you're using nix then you can use the provided devshell to get your development environment up and running, it also includes the pre-push hook provided. You can do so by executing `direnv allow` or `nix develop`. |
250 | 260 |
|
251 | 261 | ### License |
|
0 commit comments