1{
2 lib,
3 fetchFromGitHub,
4 rustPlatform,
5}:
6
7rustPlatform.buildRustPackage {
8 pname = "git-vanity-hash";
9 version = "1.0.0";
10
11 src = fetchFromGitHub {
12 owner = "prasmussen";
13 repo = "git-vanity-hash";
14 # v1.0.0 + build fix
15 rev = "a80e7725ac6d0b7e6807cd7315cfdc7eaf0584f6";
16 hash = "sha256-1z4jbtzUB3SH79dDXAITf7Vup1YZdTLHBieSrhrvSXc=";
17 };
18
19 cargoHash = "sha256-aHqH7SQBIe0oqD3MegWvAR3UvzRBm2X92lP931nVVtA=";
20
21 postInstall = ''
22 mkdir -p $out/share/doc/git-vanity-hash
23 cp README.md $out/share/doc/git-vanity-hash
24 '';
25
26 meta = with lib; {
27 homepage = "https://github.com/prasmussen/git-vanity-hash";
28 description = "Tool for creating commit hashes with a specific prefix";
29 license = [ licenses.mit ];
30 maintainers = [ maintainers.kaction ];
31 mainProgram = "git-vanity-hash";
32 };
33}